?? frmclasssel.frm
字號:
VERSION 5.00
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCTL.OCX"
Begin VB.Form FrmClassSel
BorderStyle = 1 'Fixed Single
ClientHeight = 3870
ClientLeft = 15
ClientTop = 15
ClientWidth = 5550
ControlBox = 0 'False
LinkTopic = "Form1"
LockControls = -1 'True
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 3870
ScaleWidth = 5550
Begin VB.CommandButton Cmd_OK
BackColor = &H80000004&
Caption = "確 定"
Default = -1 'True
Height = 400
Left = 1158
MouseIcon = "FrmClassSel.frx":0000
MousePointer = 99 'Custom
Style = 1 'Graphical
TabIndex = 1
Top = 3240
Width = 1300
End
Begin VB.CommandButton Cmd_Cancel
BackColor = &H80000004&
Caption = "取 消"
Height = 400
Left = 3093
MouseIcon = "FrmClassSel.frx":030A
MousePointer = 99 'Custom
Style = 1 'Graphical
TabIndex = 2
Top = 3240
Width = 1300
End
Begin MSComctlLib.ImageList ImageList3
Left = 0
Top = 3120
_ExtentX = 1005
_ExtentY = 1005
BackColor = -2147483628
ImageWidth = 16
ImageHeight = 16
MaskColor = 16777215
_Version = 393216
BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628}
NumListImages = 5
BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "FrmClassSel.frx":0614
Key = ""
EndProperty
BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "FrmClassSel.frx":2FA6
Key = ""
EndProperty
BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "FrmClassSel.frx":5938
Key = ""
EndProperty
BeginProperty ListImage4 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "FrmClassSel.frx":82CA
Key = ""
EndProperty
BeginProperty ListImage5 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "FrmClassSel.frx":AC5C
Key = ""
EndProperty
EndProperty
End
Begin MSComctlLib.TreeView TreeView1
Height = 3015
Left = 240
TabIndex = 0
Top = 120
Width = 5055
_ExtentX = 8916
_ExtentY = 5318
_Version = 393217
HideSelection = 0 'False
LabelEdit = 1
Sorted = -1 'True
Style = 7
HotTracking = -1 'True
SingleSel = -1 'True
ImageList = "ImageList3"
BorderStyle = 1
Appearance = 1
MousePointer = 99
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋體"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
MouseIcon = "FrmClassSel.frx":D5EE
End
End
Attribute VB_Name = "FrmClassSel"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Cmd_Cancel_Click()
Unload Me
End Sub
Private Sub Cmd_OK_Click()
If MyClass.Class_Id <= 0 Then
MsgBox "請選擇院系班級"
Exit Sub
End If
'將選擇院系班級的數(shù)據(jù)保存在CurClass變量中
CurClass.Class_Id = MyClass.Class_Id
CurClass.GetInfo (CurClass.Class_Id)
Unload Me
End Sub
Private Sub Form_Load()
Dim TmpNode As Node
FocusClassName = "學(xué)校領(lǐng)導(dǎo)"
Focuskey = ""
'設(shè)置根結(jié)點
Set TmpNode = TreeView1.Nodes.Add(, , "a0", "院系班級信息", 1, 3)
TmpNode.ExpandedImage = 2
'調(diào)用函數(shù)將所有院系班級添加到TreeView1中
Call Add_ClassToTree(TreeView1, "a0")
TmpNode.Selected = True
TreeView1_Click
End Sub
Private Sub TreeView1_Click()
Dim Focuskey As String
'根據(jù)關(guān)鍵字獲取院系班級信息
Focuskey = TreeView1.SelectedItem.Key
MyClass.Class_Name = TreeView1.SelectedItem.Text
MyClass.Class_Id = Val(Right(TreeView1.SelectedItem.Key, Len(TreeView1.SelectedItem.Key) - 1))
If Focuskey = "a0" Then '根結(jié)點
Exit Sub
End If
'如果包含子結(jié)點,則設(shè)置圖像格式
If MyClass.HaveSon(MyClass.Class_Id) = False Then
TreeView1.SelectedItem.ExpandedImage = 4
TreeView1.SelectedItem.Image = 4
TreeView1.SelectedItem.SelectedImage = 5
End If
'讀取MyClass中的所有院系班級信息
MyClass.GetInfo (MyClass.Class_Id)
End Sub
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -