⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 frmtree.frm

📁 一个能够有效管理教师(含家庭人口)的住房信息系统(含信息的添加、修改、删除等)
💻 FRM
字号:
VERSION 5.00
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCTL.OCX"
Begin VB.Form frmtree 
   BorderStyle     =   3  'Fixed Dialog
   ClientHeight    =   7230
   ClientLeft      =   45
   ClientTop       =   45
   ClientWidth     =   3735
   ControlBox      =   0   'False
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MDIChild        =   -1  'True
   MinButton       =   0   'False
   ScaleHeight     =   7230
   ScaleWidth      =   3735
   ShowInTaskbar   =   0   'False
   Begin MSComctlLib.ImageList ImageList1 
      Left            =   1080
      Top             =   2280
      _ExtentX        =   1005
      _ExtentY        =   1005
      BackColor       =   -2147483643
      ImageWidth      =   16
      ImageHeight     =   16
      MaskColor       =   12632256
      _Version        =   393216
      BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628} 
         NumListImages   =   3
         BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmtree.frx":0000
            Key             =   ""
         EndProperty
         BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmtree.frx":059A
            Key             =   ""
         EndProperty
         BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmtree.frx":06BF
            Key             =   ""
         EndProperty
      EndProperty
   End
   Begin MSComctlLib.TreeView TreeView1 
      Height          =   7215
      Left            =   0
      TabIndex        =   0
      Top             =   0
      Width           =   3735
      _ExtentX        =   6588
      _ExtentY        =   12726
      _Version        =   393217
      HideSelection   =   0   'False
      Indentation     =   741
      LabelEdit       =   1
      LineStyle       =   1
      Sorted          =   -1  'True
      Style           =   7
      ImageList       =   "ImageList1"
      BorderStyle     =   1
      Appearance      =   1
   End
End
Attribute VB_Name = "frmtree"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
'''                    教师住房管理系统   Version 1.0                    '''
'''                         (VB6.0 源代码)                             '''
'''                                                                      '''
'''                        俊彦软件工作室出品                            '''
'''                                                                      '''
'''            (浦口校区科技节“电子杯”程序设计大赛参赛作品)          '''
'''                                                                      '''
'''                程序设计:东南大学土木工程学院   周曹俊               '''
'''                                                                      '''
'''                 CopyRight AllRights Reserved (c)2003                 '''
'''                                                                      '''
'''                         2003年5月15日                                '''
'''                                                                      '''
'''                                                                      '''
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Private Sub Form_Load()
Dim num(1 To 7) As Integer, i As Integer, j As Integer, strtmp(1 To 7) As String
Dim nodex As node
'设置界面布局
Me.Left = 0
Me.Top = 0
Me.Width = Screen.Width / 3.2
Me.Height = frmMDI.ScaleHeight
Me.TreeView1.Height = Me.ScaleHeight
Me.TreeView1.Width = Me.ScaleWidth
Set db = OpenDatabase(App.Path & "\data\basicinfo.db")
Set qr = db.CreateQueryDef("")
Set qr2 = db.CreateQueryDef("")
'构造参数查询,以增加查询效率
qr.SQL = "parameters degree long;select id from host where livedgr=degree"
strtmp(1) = "分居在集体宿舍(共": strtmp(2) = "一室(共": strtmp(3) = "一室一厅(共": strtmp(4) = "二室(共": strtmp(5) = "二室一厅(共": strtmp(6) = "三室(共": strtmp(7) = "三室一厅(共"
Set nodex = TreeView1.Nodes.add(, , "t", "住房基本信息", 1)
nodex.Expanded = True
'构造树型图
With TreeView1.Nodes
    For i = 1 To 7
        qr!degree = i
        If i = 1 Then
            Set rs1 = qr.OpenRecordset()
        Else
            rs1.Requery qr
        End If
        If Not rs1.EOF Then
            rs1.MoveLast
            num(i) = rs1.RecordCount
        End If
        .add "t", tvwChild, "r" & i, strtmp(i) & num(i) & "户)", 2
        If num(i) <> 0 Then
            rs1.MoveFirst
            For j = 1 To num(i)
                Do While Not rs1.EOF
                    .add "r" & i, tvwChild, "c" & rs1!id, rs1!id, 3
                    rs1.MoveNext
                Loop
            Next
        End If
    Next
End With
TreeView1.Nodes.Item(2).Selected = True
With frmMDI
    .data.Visible = True
    .view.Visible = True
    .window.Visible = False
    .report.Visible = False
    .confirm.Enabled = False
    .Toolbar1.Buttons(4).Enabled = True
    .Toolbar1.Buttons(9).Enabled = True
    .Toolbar1.Buttons(10).Enabled = True
    .Toolbar1.Buttons(5).Enabled = False
    .Toolbar1.Buttons(6).Enabled = False
    .Toolbar1.Buttons(7).Enabled = False
    .Toolbar1.Buttons(11).Enabled = False
    .Toolbar1.Buttons(13).Enabled = False
    .Toolbar1.Buttons(14).Enabled = False
    .Toolbar1.Buttons(18).Enabled = True
    .doc.Enabled = True
End With
End Sub

Private Sub TreeView1_NodeClick(ByVal node As MSComctlLib.node)
Call clearfrminfo                '清空界面
Call browserpre(node)            '浏览信息
End Sub

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -