?? frmleft.frm
字號:
VERSION 5.00
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "mscomctl.ocx"
Object = "{24FFD1EA-5EA9-11D2-86B1-0040055C08D9}#1.0#0"; "XFloorWnd.ocx"
Begin VB.Form frmLeft
Caption = "哈爾濱車務段題庫管理系統"
ClientHeight = 6540
ClientLeft = 48
ClientTop = 348
ClientWidth = 8136
Icon = "frmLeft.frx":0000
LinkTopic = "Form1"
ScaleHeight = 6540
ScaleWidth = 8136
StartUpPosition = 3 '窗口缺省
WindowState = 2 'Maximized
Begin MSComctlLib.TreeView Tree1
Height = 1548
Left = 3948
TabIndex = 6
Top = 3300
Width = 1296
_ExtentX = 2286
_ExtentY = 2731
_Version = 393217
HideSelection = 0 'False
Indentation = 1
LabelEdit = 1
Style = 7
Appearance = 1
End
Begin VB.PictureBox P1
Appearance = 0 'Flat
BackColor = &H80000003&
ForeColor = &H80000008&
Height = 2592
Left = 1512
ScaleHeight = 2568
ScaleWidth = 6060
TabIndex = 1
Top = 204
Width = 6084
End
Begin MSComctlLib.ImageList ImList1
Left = 6720
Top = 3300
_ExtentX = 804
_ExtentY = 804
BackColor = -2147483643
ImageWidth = 32
ImageHeight = 32
MaskColor = 12632256
_Version = 393216
BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628}
NumListImages = 11
BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmLeft.frx":030A
Key = ""
EndProperty
BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmLeft.frx":075C
Key = ""
EndProperty
BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmLeft.frx":0CEE
Key = ""
EndProperty
BeginProperty ListImage4 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmLeft.frx":1140
Key = ""
EndProperty
BeginProperty ListImage5 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmLeft.frx":1592
Key = ""
EndProperty
BeginProperty ListImage6 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmLeft.frx":19E4
Key = ""
EndProperty
BeginProperty ListImage7 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmLeft.frx":1CFE
Key = ""
EndProperty
BeginProperty ListImage8 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmLeft.frx":2150
Key = ""
EndProperty
BeginProperty ListImage9 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmLeft.frx":25A2
Key = ""
EndProperty
BeginProperty ListImage10 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmLeft.frx":29F4
Key = ""
EndProperty
BeginProperty ListImage11 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmLeft.frx":2E46
Key = ""
EndProperty
EndProperty
End
Begin MSComctlLib.ListView List1
Height = 360
Left = 1764
TabIndex = 0
Top = 3000
Width = 1200
_ExtentX = 2117
_ExtentY = 635
Arrange = 2
LabelEdit = 1
LabelWrap = 0 'False
HideSelection = -1 'True
FlatScrollBar = -1 'True
PictureAlignment= 4
_Version = 393217
ForeColor = -2147483643
BackColor = -2147483647
BorderStyle = 1
Appearance = 1
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋體"
Size = 10.8
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
NumItems = 1
BeginProperty ColumnHeader(1) {BDD1F052-858B-11D1-B16A-00C0F0283628}
Text = "s"
Object.Width = 2540
EndProperty
End
Begin XFLOORWNDLib.XFloorWnd X1
Height = 6252
Left = 264
TabIndex = 2
Top = 168
Width = 1164
_Version = 65536
_ExtentX = 2053
_ExtentY = 11028
_StockProps = 5
BackColor = 8421504
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋體"
Size = 10.8
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
End
Begin MSComctlLib.ListView List2
Height = 408
Left = 1728
TabIndex = 3
Top = 3420
Width = 1176
_ExtentX = 2074
_ExtentY = 720
Arrange = 2
LabelEdit = 1
LabelWrap = 0 'False
HideSelection = -1 'True
FlatScrollBar = -1 'True
PictureAlignment= 4
_Version = 393217
ForeColor = -2147483643
BackColor = -2147483647
BorderStyle = 1
Appearance = 1
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋體"
Size = 10.8
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
NumItems = 0
End
Begin MSComctlLib.ListView List3
Height = 408
Left = 1728
TabIndex = 4
Top = 3936
Width = 1176
_ExtentX = 2074
_ExtentY = 720
Arrange = 2
LabelEdit = 1
LabelWrap = 0 'False
HideSelection = -1 'True
FlatScrollBar = -1 'True
PictureAlignment= 4
_Version = 393217
ForeColor = -2147483643
BackColor = -2147483647
BorderStyle = 1
Appearance = 1
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋體"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
NumItems = 0
End
Begin MSComctlLib.ListView List4
Height = 408
Left = 1716
TabIndex = 5
Top = 4392
Width = 1176
_ExtentX = 2074
_ExtentY = 720
Arrange = 2
LabelEdit = 1
LabelWrap = 0 'False
HideSelection = -1 'True
FlatScrollBar = -1 'True
PictureAlignment= 4
_Version = 393217
ForeColor = -2147483643
BackColor = -2147483647
BorderStyle = 1
Appearance = 1
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋體"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
NumItems = 0
End
Begin MSComctlLib.ImageList ImList2
Left = 6360
Top = 3936
_ExtentX = 804
_ExtentY = 804
BackColor = -2147483643
ImageWidth = 20
ImageHeight = 20
MaskColor = 12632256
_Version = 393216
BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628}
NumListImages = 4
BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmLeft.frx":3298
Key = ""
EndProperty
BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmLeft.frx":35B2
Key = ""
EndProperty
BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmLeft.frx":3A04
Key = ""
EndProperty
BeginProperty ListImage4 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmLeft.frx":3F96
Key = ""
EndProperty
EndProperty
End
End
Attribute VB_Name = "frmLeft"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private xml_txt As String
Private b_tmp As Boolean
Private Sub Form_Activate()
SetForm
End Sub
Private Sub Form_Initialize()
b_tmp = False
End Sub
Private Sub Form_Load()
' Dim scon As String
' scon = "PROVIDER=Microsoft.Jet.OLEDB.3.51;Data Source=" & App.Path & "\TK.mdb"
' p_conn = scon
' dbcon.open scon
SetXObj
End Sub
Private Sub SetXObj()
With X1
.Pages = "系統維護\#題庫維護\#試題瀏覽\#試題生成\#\#"
End With
X1.AttachWindow 0, List1.hwnd
X1.AttachWindow 1, List2.hwnd
X1.AttachWindow 2, Tree1.hwnd
X1.AttachWindow 3, List3.hwnd
X1.Init
X1.ActivatePage 0
List1.Icons = ImList1
List1.Arrange = lvwAutoTop
List1.ListItems.Add , "XMSZ", "項目設置", 5
List1.ListItems.Add , "SJND", "試卷難度級別定義", 5
List1.ListItems.Add , "USERS", "系統用戶管理", 7
List2.Icons = ImList1
List2.Arrange = lvwAutoLeft
List2.ListItems.Add , "TJDA", "添加新試題", 5
List2.ListItems.Add , "DACX", "試題查詢", 5
AddTree
List3.Icons = ImList1
List3.Arrange = lvwAutoLeft
List3.ListItems.Add , "SCFA", "建立自動生成方案", 9
List3.ListItems.Add , "FACX", "生成方案查詢", 10
List3.ListItems.Add , "SJCX", "試卷查詢", 10
End Sub
Private Sub SetForm()
With X1
.Left = 20
.Top = 10
.Width = Me.Width * 0.15
.Height = Me.Height * 0.95
End With
With P1
.Left = X1.Left + X1.Width + 20
.Top = 10
.Width = Me.Width - .Left
.Height = Me.Height * 0.95
End With
X1.ZOrder 0
End Sub
Private Sub Form_Unload(Cancel As Integer)
Unload frmDA
Unload frmSets
Unload frmDaView
Unload frmDACX
Unload frmAddValue
End Sub
Private Sub List1_ItemClick(ByVal Item As MSComctlLib.ListItem)
Select Case Item.Key
Case "XMSZ"
ShowForm frmSets, "", ""
Case "SJND"
ShowForm frmSJND, "", ""
Case "USERS"
ShowForm frmUser, "", ""
End Select
End Sub
Private Sub List2_ItemClick(ByVal Item As MSComctlLib.ListItem)
Select Case Item.Key
Case "TJDA"
ShowForm frmDA, SNEW, ""
Case "DACX"
ShowForm frmDACX, "", ""
End Select
End Sub
Private Sub AddTree()
Dim Rs As New ADODB.Recordset
Dim sql As String
Dim root_node As node
Dim bm_node As node
Dim tmp_node As node
sql = "select * from setings where type='SETING'"
Rs.open sql, dbcon, adOpenKeyset, adLockOptimistic, adCmdText
If (Rs.EOF And Rs.BOF) Or IsNull(Rs("xml_value")) Then
MsgMsg "請先完成系統設置!"
Exit Sub
End If
xml_txt = Rs("xml_value")
Rs.Close
Set Tree1.ImageList = ImList2
Set root_node = Tree1.Nodes.Add(, , "ROOT", "全部試題", 4)
' Set bm_node = Tree1.Nodes.Add(root_node, tvwChild, "BMDA", "部門", 3)
'AddTreeBM Tree1, bm_node, "題型"
'bm_node.EnsureVisible
Dim xml_doc As New MSXML.DOMDocument
Dim list_nodes As IXMLDOMNodeList
Dim local_uil As String
Dim tp_node As node
Dim node As IXMLDOMElement
xml_doc.loadXML xml_txt
local_uil = "項目/專業/ITEM"
Set list_nodes = xml_doc.getElementsByTagName(local_uil)
For Each node In list_nodes
Set bm_node = Tree1.Nodes.Add(root_node, tvwChild, node.Text, node.Text, 3)
AddTreeBM Tree1, bm_node, "題型"
bm_node.EnsureVisible
Set bm_node = Nothing
Next
End Sub
Private Sub AddTreeBM(ByRef Tree As TreeView, ByRef prenode As node, ByVal XM As String)
On Error Resume Next
Dim xml_doc As New MSXML.DOMDocument
Dim list_nodes As IXMLDOMNodeList
Dim node As IXMLDOMElement
Dim local_uil As String
Dim tmp_node As node
xml_doc.loadXML xml_txt
local_uil = "項目/" & XM & "/ITEM"
Set list_nodes = xml_doc.getElementsByTagName(local_uil)
For Each node In list_nodes
Set tmp_node = Tree.Nodes.Add(prenode, tvwChild, prenode.Text & node.Text, node.Text, 2)
tmp_node.EnsureVisible
Next
End Sub
Private Sub List3_ItemClick(ByVal Item As MSComctlLib.ListItem)
Select Case Item.Key
Case "SCFA"
ShowForm frmSTSC, SNEW, ""
Case "FACX"
ShowForm frmFACX, "", ""
Case "SJCX"
ShowForm frjSJCK, "", ""
End Select
End Sub
Private Sub Tree1_Click()
With Tree1
If .SelectedItem.children = 0 Then
frmDaView.ClearList
frmDaView.ShowData .SelectedItem.Parent.Text, .SelectedItem.Text
End If
End With
End Sub
Private Sub X1_ActivatePage(ByVal nIndex As Integer)
If nIndex = 2 And (Not b_tmp) Then
b_tmp = True
Exit Sub
End If
If nIndex = 2 Then
ShowForm frmDaView, "", ""
Else
Unload frmDaView
End If
End Sub
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -