📄 frmlocation.frm
字号:
VERSION 5.00
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCTL.OCX"
Begin VB.Form FrmLocation
Caption = "地点管理"
ClientHeight = 6705
ClientLeft = 60
ClientTop = 450
ClientWidth = 6360
Icon = "FrmLocation.frx":0000
LinkTopic = "Form1"
MaxButton = 0 'False
ScaleHeight = 6705
ScaleWidth = 6360
StartUpPosition = 1 '所有者中心
Begin VB.Frame Frame1
Caption = "编辑"
Height = 855
Left = 120
TabIndex = 2
Top = 5760
Width = 6135
Begin VB.TextBox txtName
Height = 390
Left = 960
TabIndex = 3
Top = 240
Width = 2175
End
Begin MSComctlLib.ImageList ImageList2
Left = 5160
Top = 120
_ExtentX = 1005
_ExtentY = 1005
BackColor = -2147483643
ImageWidth = 16
ImageHeight = 16
MaskColor = 12632256
_Version = 393216
BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628}
NumListImages = 4
BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "FrmLocation.frx":08CA
Key = ""
EndProperty
BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "FrmLocation.frx":0C64
Key = ""
EndProperty
BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "FrmLocation.frx":11FE
Key = ""
EndProperty
BeginProperty ListImage4 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "FrmLocation.frx":1598
Key = ""
EndProperty
EndProperty
End
Begin VB.Label Label3
Caption = "名称:"
Height = 255
Left = 240
TabIndex = 4
Top = 360
Width = 855
End
End
Begin MSComctlLib.TreeView TreeView1
Height = 4815
Left = 0
TabIndex = 0
Top = 840
Width = 6375
_ExtentX = 11245
_ExtentY = 8493
_Version = 393217
Indentation = 530
Style = 7
Appearance = 1
End
Begin MSComctlLib.Toolbar Toolbar1
Align = 1 'Align Top
Height = 810
Left = 0
TabIndex = 1
Top = 0
Width = 6360
_ExtentX = 11218
_ExtentY = 1429
ButtonWidth = 1032
ButtonHeight = 1376
Appearance = 1
Style = 1
ImageList = "ImageList1"
_Version = 393216
BeginProperty Buttons {66833FE8-8583-11D1-B16A-00C0F0283628}
NumButtons = 5
BeginProperty Button1 {66833FEA-8583-11D1-B16A-00C0F0283628}
Caption = "新建"
Key = "新建"
ImageIndex = 1
EndProperty
BeginProperty Button2 {66833FEA-8583-11D1-B16A-00C0F0283628}
Caption = "保存"
Key = "保存"
ImageIndex = 2
EndProperty
BeginProperty Button3 {66833FEA-8583-11D1-B16A-00C0F0283628}
Caption = "删除"
Key = "删除"
ImageIndex = 3
EndProperty
BeginProperty Button4 {66833FEA-8583-11D1-B16A-00C0F0283628}
Style = 3
EndProperty
BeginProperty Button5 {66833FEA-8583-11D1-B16A-00C0F0283628}
Caption = "关闭"
Key = "关闭"
ImageIndex = 4
EndProperty
EndProperty
BorderStyle = 1
Begin MSComctlLib.ImageList ImageList1
Left = 4680
Top = 120
_ExtentX = 1005
_ExtentY = 1005
BackColor = -2147483643
ImageWidth = 32
ImageHeight = 32
MaskColor = 12632256
_Version = 393216
BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628}
NumListImages = 4
BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "FrmLocation.frx":1B32
Key = ""
EndProperty
BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "FrmLocation.frx":240C
Key = ""
EndProperty
BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "FrmLocation.frx":2CE6
Key = ""
EndProperty
BeginProperty ListImage4 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "FrmLocation.frx":35C0
Key = ""
EndProperty
EndProperty
End
End
End
Attribute VB_Name = "FrmLocation"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'****************************************************************************
'人人为我,我为人人
'枕善居收藏整理
'发布日期:2007/09/25
'描 述:江苏大学网络信息中心网络管理系统 - v1.0 Beta
'网 站:http://www.Mndsoft.com/ (VB6源码博客)
'网 站:http://www.VbDnet.com/ (VB.NET源码博客,主要基于.NET2005)
'e-mail :Mndsoft@163.com
'e-mail :Mndsoft@126.com
'OICQ :88382850
' 如果您有新的好的代码别忘记给枕善居哦!
'****************************************************************************
Dim txtSQL As String
Dim MsgText As String
Dim HasError As Boolean
Dim rootNode As Node, nd As Node, sel_nd As Node, sel_parent_nd As Node
Dim name_old As String
Private Sub Form_Load()
Set TreeView1.ImageList = ImageList2
Set rootNode = TreeView1.Nodes.Add(, , "Root", "江苏大学", 1)
rootNode.Expanded = True
Fill_Root_tree (rootNode.key)
End Sub
Private Sub Fill_Root_tree(NodeKey As String)
Dim rst As ADODB.Recordset
Set rst = New ADODB.Recordset
txtSQL = "select * from tbl_area"
Set rst = ExecuteSQL(txtSQL, MsgText, HasError)
Do While Not rst.EOF
Set nd = TreeView1.Nodes.Add(NodeKey, tvwChild, "area_" & rst.Fields("area_id"), rst.Fields("area_name"), 2)
nd.Expanded = True
Call Fill_Area_tree(nd.key, rst.Fields("area_id"))
rst.MoveNext
Loop
End Sub
Sub Fill_Area_tree(NodeKey As String, area_id As String)
Dim rst As ADODB.Recordset
Set rst = New ADODB.Recordset
txtSQL = "select * from tbl_building where area_id = " & area_id
Set rst = ExecuteSQL(txtSQL, MsgText, HasError)
Do While Not rst.EOF
Set nd = TreeView1.Nodes.Add(NodeKey, tvwChild, "building_" & rst.Fields("building_id"), rst.Fields("building_name"), 3)
nd.Expanded = True
Call Fill_Building_tree(nd.key, rst.Fields("building_id"))
rst.MoveNext
Loop
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -