📄 frmmain.frm
字号:
VERSION 5.00
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCTL.OCX"
Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0"; "COMDLG32.OCX"
Begin VB.Form frmMain
Caption = "人力资源管理系统"
ClientHeight = 8790
ClientLeft = 165
ClientTop = 450
ClientWidth = 11970
Icon = "frmMain.frx":0000
LinkTopic = "Form1"
Picture = "frmMain.frx":164A
ScaleHeight = 8790
ScaleWidth = 11970
StartUpPosition = 2 '屏幕中心
Begin MSComDlg.CommonDialog CommonDialog1
Left = -105
Top = 720
_ExtentX = 847
_ExtentY = 847
_Version = 393216
End
Begin MSComctlLib.StatusBar sbStatusBar
Align = 2 'Align Bottom
Height = 390
Left = 0
TabIndex = 0
Top = 8400
Width = 11970
_ExtentX = 21114
_ExtentY = 688
_Version = 393216
BeginProperty Panels {8E3867A5-8586-11D1-B16A-00C0F0283628}
NumPanels = 1
BeginProperty Panel1 {8E3867AB-8586-11D1-B16A-00C0F0283628}
EndProperty
EndProperty
End
Begin MSComctlLib.ImageList imlToolbarIcons
Left = -330
Top = 90
_ExtentX = 1005
_ExtentY = 1005
BackColor = -2147483643
ImageWidth = 32
ImageHeight = 32
MaskColor = 12632256
_Version = 393216
BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628}
NumListImages = 2
BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmMain.frx":168CF
Key = ""
EndProperty
BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmMain.frx":17F29
Key = ""
EndProperty
EndProperty
End
Begin MSComctlLib.TreeView TreeView1
Height = 6945
Left = 150
TabIndex = 2
Top = 1380
Width = 2865
_ExtentX = 5054
_ExtentY = 12250
_Version = 393217
Style = 7
ImageList = "imlToolbarIcons"
Appearance = 0
End
Begin VB.Label Label2
BackStyle = 0 'Transparent
Height = 300
Index = 3
Left = 11445
TabIndex = 7
Top = 570
Width = 300
End
Begin VB.Label Label2
BackStyle = 0 'Transparent
Height = 300
Index = 2
Left = 10845
TabIndex = 6
Top = 570
Width = 300
End
Begin VB.Label Label2
BackStyle = 0 'Transparent
Height = 300
Index = 1
Left = 10245
TabIndex = 5
Top = 570
Width = 300
End
Begin VB.Label Label2
BackStyle = 0 'Transparent
Height = 300
Index = 0
Left = 9675
TabIndex = 4
Top = 570
Width = 300
End
Begin VB.Label lblCaption1
BackStyle = 0 'Transparent
Height = 180
Index = 0
Left = 4005
TabIndex = 3
Top = 3765
Width = 1470
End
Begin VB.Image Image1
Height = 1125
Index = 0
Left = 4000
Picture = "frmMain.frx":19583
Top = 2625
Visible = 0 'False
Width = 1470
End
Begin VB.Label Label1
BackStyle = 0 'Transparent
Height = 180
Left = 3705
TabIndex = 1
Top = 1260
Width = 6045
End
Begin VB.Menu m
Caption = "1000"
Index = 0
Begin VB.Menu m1
Caption = "1001"
Index = 0
End
Begin VB.Menu m1
Caption = "-"
Index = 1
End
Begin VB.Menu m1
Caption = "1002"
Index = 2
End
Begin VB.Menu m1
Caption = "1003"
Index = 3
End
Begin VB.Menu m1
Caption = "1004"
Index = 4
End
Begin VB.Menu m1
Caption = "-"
Index = 5
End
Begin VB.Menu m1
Caption = "1005"
Index = 6
End
Begin VB.Menu m1
Caption = "1006"
Index = 7
End
Begin VB.Menu m1
Caption = "1007"
Index = 8
End
Begin VB.Menu m1
Caption = "-"
Index = 9
End
Begin VB.Menu m1
Caption = "1008"
Index = 10
End
Begin VB.Menu m1
Caption = "1009"
Index = 11
End
Begin VB.Menu m1
Caption = "1010"
Index = 12
End
Begin VB.Menu m1
Caption = "1011"
Index = 13
End
End
Begin VB.Menu m
Caption = "1012"
Index = 1
Begin VB.Menu m2
Caption = "1013"
Index = 0
End
Begin VB.Menu m2
Caption = "1014"
Index = 1
End
Begin VB.Menu m2
Caption = "1015"
Index = 2
End
End
Begin VB.Menu m
Caption = "1016"
Index = 2
Begin VB.Menu m3
Caption = "1017"
Index = 0
End
Begin VB.Menu m3
Caption = "1018"
Index = 1
End
Begin VB.Menu m3
Caption = "-"
Index = 2
End
Begin VB.Menu m3
Caption = "1019"
Index = 3
End
Begin VB.Menu m3
Caption = "1020"
Index = 4
End
Begin VB.Menu m3
Caption = "1021"
Index = 5
End
Begin VB.Menu m3
Caption = "-"
Index = 6
End
Begin VB.Menu m3
Caption = "1022"
Index = 7
End
Begin VB.Menu m3
Caption = "1023"
Index = 8
End
Begin VB.Menu m3
Caption = "1024"
Index = 9
End
Begin VB.Menu m3
Caption = "1025"
Index = 10
End
Begin VB.Menu m3
Caption = "1026"
Index = 11
End
Begin VB.Menu m3
Caption = "-"
Index = 12
End
Begin VB.Menu m3
Caption = "1027"
Index = 13
End
Begin VB.Menu m3
Caption = "1028"
Index = 14
End
End
Begin VB.Menu m
Caption = "1029"
Index = 3
Begin VB.Menu m4
Caption = "1030"
Index = 0
End
Begin VB.Menu m4
Caption = "1031"
Index = 1
End
Begin VB.Menu m4
Caption = "1032"
Index = 2
End
Begin VB.Menu m4
Caption = "-"
Index = 3
End
Begin VB.Menu m4
Caption = "1033"
Index = 4
End
Begin VB.Menu m4
Caption = "1034"
Index = 5
End
Begin VB.Menu m4
Caption = "-"
Index = 6
End
Begin VB.Menu m4
Caption = "1035"
Index = 7
End
End
Begin VB.Menu m
Caption = "1036"
Index = 4
Begin VB.Menu m5
Caption = "1037"
Index = 0
End
Begin VB.Menu m5
Caption = "1038"
Index = 1
End
Begin VB.Menu m5
Caption = "1039"
Index = 2
End
Begin VB.Menu m5
Caption = "1040"
Index = 3
End
End
Begin VB.Menu m
Caption = "1041"
Index = 5
Begin VB.Menu m6
Caption = "1042"
Index = 0
End
Begin VB.Menu m6
Caption = "1043"
Index = 1
End
Begin VB.Menu m6
Caption = "1044"
Index = 2
End
Begin VB.Menu m6
Caption = "1045"
Index = 3
End
End
Begin VB.Menu m
Caption = "1046"
Index = 6
Begin VB.Menu m7
Caption = "1047"
Index = 0
End
Begin VB.Menu m7
Caption = "1048"
Index = 1
End
End
End
Attribute VB_Name = "frmMain"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim i As Integer, a As Integer
Function blnPower(str As String) As Boolean
Dim rs1 As New ADODB.Recordset
rs1.Open "select * from 权限信息表 where 操作员='" & czy & "'", Cnn, adOpenKeyset, adLockOptimistic
If rs1.RecordCount > 0 Then
If rs1.Fields(str) = False Then
blnPower = False
Else
blnPower = True
End If
End If
rs1.Close
End Function
Private Sub Form_Load()
Dim pnlX As Panel
'添加面板,并将它们设置为目录。
sbStatusBar.Panels(1).AutoSize = sbrContents
sbStatusBar.Panels(1) = mytag
Set pnlX = sbStatusBar.Panels.Add
pnlX.AutoSize = sbrContents
pnlX.text = "当前操作员: " & czy
Set pnlX = sbStatusBar.Panels.Add
pnlX.Style = sbrDate
Set pnlX = sbStatusBar.Panels.Add
pnlX.Style = sbrTime
'设置图形按钮的初始位置
Image1(0).Left = 4000
Image1(0).Top = 2625
'将VB资源管理器中的字符串添加到菜单中
On Error Resume Next
Dim ctl As Control
Dim sCtlType As String
For Each ctl In Me.Controls
sCtlType = TypeName(ctl)
If sCtlType = "Menu" Then
ctl.Caption = LoadResString(CInt(ctl.Caption))
End If
Next
'添加树状菜单
Dim nodX As Node
Set nodX = TreeView1.Nodes.Add(, , "X1", "基本资料管理", 1)
For a = 1 To 11
TreeView1.Nodes.Add "X1", tvwChild, "C" & a, LoadResString(a + 1000), 2
Next a
Set nodX = TreeView1.Nodes.Add(, , "X2", "工资设置", 1)
For a = 12 To 14
TreeView1.Nodes.Add "X2", tvwChild, "C" & a, LoadResString(a + 1001), 2
Next a
Set nodX = TreeView1.Nodes.Add(, , "X3", "人事管理", 1)
For a = 15 To 26
TreeView1.Nodes.Add "X3", tvwChild, "C" & a, LoadResString(a + 1002), 2
Next a
Set nodX = TreeView1.Nodes.Add(, , "X4", "工资管理", 1)
For a = 27 To 32
TreeView1.Nodes.Add "X4", tvwChild, "C" & a, LoadResString(a + 1003), 2
Next a
Set nodX = TreeView1.Nodes.Add(, , "X5", "系统管理", 1)
For a = 33 To 36
TreeView1.Nodes.Add "X5", tvwChild, "C" & a, LoadResString(a + 1004), 2
Next a
Set nodX = TreeView1.Nodes.Add(, , "X6", "工具", 1)
For a = 37 To 40
TreeView1.Nodes.Add "X6", tvwChild, "C" & a, LoadResString(a + 1005), 2
Next a
Set nodX = TreeView1.Nodes.Add(, , "X7", "帮助", 1)
Set nodX = TreeView1.Nodes.Add("X7", tvwChild, "C41", "帮助", 2)
Set nodX = TreeView1.Nodes.Add("X7", tvwChild, "C42", "关于", 2)
nodX.EnsureVisible
'动态创建图形按钮(Image控件)和标题(Label控件)
For i = 1 To 12
i = Image1.UBound + 1
Load Image1(i)
Load lblCaption1(i)
Image1(i).ZOrder (0)
lblCaption1(i).ZOrder (0)
Next i
End Sub
Private Sub Image1_MouseMove(index As Integer, Button As Integer, Shift As Integer, X As Single, Y As Single)
Image1(index).BorderStyle = 1
Label1.Caption = TreeView1.SelectedItem.text & "/" & lblCaption1(index).Caption
End Sub
Private Sub Label2_MouseMove(index As Integer, Button As Integer, Shift As Integer, X As Single, Y As Single)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -