frmMain.frm
上传用户:wd52qq
上传日期:2022-07-24
资源大小:5366k
文件大小:26k
- 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)
- Label2(index).BorderStyle = 1
- End Sub
- Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
- For i = 1 To Image1.UBound
- Image1(i).BorderStyle = 0
- Next i
- For i = 0 To Label2.UBound
- Label2(i).BorderStyle = 0
- Next i
- End Sub
- Private Sub Label1_Change()
- sbStatusBar.Panels(1).text = "当前位置: " & Label1
- End Sub
- Private Sub Image1_Click(index As Integer)
- text = lblCaption1(index).Caption
- Image1(index).BorderStyle = 1
- If blnPower(lblCaption1(index).Caption) = False Then
- MsgBox "对不起,您没有使用此项功能的权限!", vbInformation, "提示窗口"
- Exit Sub
- End If
- Select Case lblCaption1(index).Caption
- Case "部门管理"
- Load main_jbzl_bmgl
- main_jbzl_bmgl.Show 1
- Case "工种类型管理"
- jbxxtb = "工种表"
- Case "职务类型管理"
- jbxxtb = "职务表"
- Case "职称类型管理"
- jbxxtb = "职称表"
- Case "文化程度管理"
- jbxxtb = "文化程度表"
- Case "政治面貌管理"
- jbxxtb = "政治面貌表"
- Case "民族管理"
- jbxxtb = "民族表"
- Case "培训课程管理"
- Load main_jbzl_pxkc
- main_jbzl_pxkc.Show 1
- Case "考核项目管理"
- Load main_jbzl_khlx
- main_jbzl_khlx.Show 1
- Case "合同类型管理"
- Load main_jbzl_htlx
- main_jbzl_htlx.Show 1
- Case "聘用类型管理"
- Load main_jbzl_pylx
- main_jbzl_pylx.Show
- Case "考勤信息设置"
- Load main_gzsz_kqsz
- main_gzsz_kqsz.Show 1
- Case "奖励项目设置"
- jbxxtb = "奖励项目表"
- Load main_jbzl_public
- main_jbzl_public.Show 1
- Case "惩罚项目设置"
- jbxxtb = "惩罚项目表"
- Load main_jbzl_public
- main_jbzl_public.Show 1
- Case "工资设置"
- Load main_gzsz_gzgs
- main_gzsz_gzgs.Show 1
- Case "人事信息管理"
- Load main_rsgl_rsdaxx
- main_rsgl_rsdaxx.Show 1
- Case "新员工登记"
- blnAddRS = True
- Load main_rsgl_rsdaxx_lr
- main_rsgl_rsdaxx_lr.Show 1
- Case "员工调动"
- Load main_rsgl_rsbd
- main_rsgl_rsbd.Show 1
- Case "员工离职"
- Load main_rsgl_zylz
- main_rsgl_zylz.Show 1
- Case "员工复职"
- Load main_rsgl_zyfz
- main_rsgl_zyfz.Show 1
- Case "培训管理"
- Load main_rsgl_pxgl
- main_rsgl_pxgl.Show 1
- Case "考核管理"
- Load main_rsgl_khgl
- main_rsgl_khgl.Show 1
- Case "合同管理"
- Load main_rsgl_htgl
- main_rsgl_htgl.Show 1
- Case "聘用管理"
- Load main_rsgl_pygl
- main_rsgl_pygl.Show 1
- Case "保险管理"
- Load main_rsgl_bxgl
- main_rsgl_bxgl.Show 1
- Case "合同到期处理"
- Cnn.Execute ("update 合同表 set 状态='到期' where 合同结束日期>" & Date)
- MsgBox "到期合同处理成功!", , "提示"
- Case "聘用到期处理"
- Cnn.Execute ("update 聘用表 set 状态='到期' where 聘用结束日期>" & Date)
- MsgBox "聘用到期处理成功!", , "提示"
- Case "过期数据处理"
- Load main_gzgl_gqsjcl
- main_gzgl_gqsjcl.Show 1
- Case "工资信息管理"
- Load main_gzgl_gzgl
- main_gzgl_gzgl.Show 1
- Case "建立新月份工资"
- Load main_gzgl_xyfgz
- main_gzgl_xyfgz.Show 1
- Case "员工奖励管理"
- Load main_gzgl_jlgl
- main_gzgl_jlgl.Show 1
- Case "员工惩罚管理"
- Load main_gzgl_cfgl
- main_gzgl_cfgl.Show 1
- Case "考勤信息管理"
- Load main_gzgl_kqgl
- main_gzgl_kqgl.Show 1
- Case "用户管理"
- Load main_xtgl_czqx
- main_xtgl_czqx.Show 1
- Case "口令设置"
- Load main_xtgl_mm
- main_xtgl_mm.Show 1
- Case "数据初始化"
- Load main_xtgl_sjcsh
- main_xtgl_sjcsh.Show 1
- Case "数据库备份与恢复"
- Shell App.Path & "数据备份与恢复.exe", 1
- Unload Me
- Case "记事本"
- Shell "notepad.exe", 1
- Case "计算器"
- Shell "CALC.EXE", 1
- Case "Office-Word"
- Dim newword As Word.Application
- Set newword = CreateObject("Word.application")
- newword.Documents.Add
- newword.Visible = True
- Case "Office-Excel"
- Dim newxls As Excel.Application
- Set newxls = CreateObject("Excel.Application") '创建excel应用程序,打开excel2000
- newxls.Workbooks.Add '创建工作簿
- newxls.Visible = True
- Case "帮助"
- CommonDialog1.HelpFile = App.Path & "/HELP.HLP"
- CommonDialog1.HelpCommand = cdlHelpContents
- CommonDialog1.ShowHelp '显示 Visual Basic 帮助目录主题
- Case "关于"
- Load frm_about
- frm_about.Show 1
- End Select
- With lblCaption1(index)
- If .Caption = "工种类型管理" Or .Caption = "职务类型管理" Or .Caption = "职称类型管理" Or .Caption = "文化程度管理" Or .Caption = "政治面貌管理" Or .Caption = "民族管理" Then
- Load main_jbzl_public
- main_jbzl_public.Show 1
- End If
- End With
- End Sub
- Private Sub Label2_Click(index As Integer)
- Select Case index
- Case 0
- Temp = "www.mingrisoft.com" '所要连接的网站名称
- ShellExecute 0&, vbNullString, Temp, vbNullString, vbNullString, 0 '调用IE
- Case 1
- m7_Click (1)
- Case 2
- m7_Click (0)
- Case 3
- End
- End Select
- End Sub
- Private Sub m1_Click(index As Integer)
- text = m1(index).Caption
- If blnPower(m1(index).Caption) = False Then
- MsgBox "对不起,您没有使用此项功能的权限!", vbInformation, "提示窗口"
- Exit Sub
- End If
- Select Case m1(index).Caption
- Case "部门管理"
- Load main_jbzl_bmgl
- main_jbzl_bmgl.Show 1
- Case "工种类型管理"
- jbxxtb = "工种表"
- Case "职务类型管理"
- jbxxtb = "职务表"
- Case "职称类型管理"
- jbxxtb = "职称表"
- Case "文化程度管理"
- jbxxtb = "文化程度表"
- Case "政治面貌管理"
- jbxxtb = "政治面貌表"
- Case "民族管理"
- jbxxtb = "民族表"
- Case "培训课程管理"
- Load main_jbzl_pxkc
- main_jbzl_pxkc.Show 1
- Case "考核项目管理"
- Load main_jbzl_khlx
- main_jbzl_khlx.Show 1
- Case "合同类型管理"
- Load main_jbzl_htlx
- main_jbzl_htlx.Show 1
- Case "聘用类型管理"
- Load main_jbzl_pylx
- main_jbzl_pylx.Show
- End Select
- With m1(index)
- If .Caption = "工种类型管理" Or .Caption = "职务类型管理" Or .Caption = "职称类型管理" Or .Caption = "文化程度管理" Or .Caption = "政治面貌管理" Or .Caption = "民族管理" Then
- Load main_jbzl_public
- main_jbzl_public.Show 1
- End If
- End With
- End Sub
- Private Sub m2_Click(index As Integer)
- text = m2(index).Caption
- If blnPower(m2(index).Caption) = False Then
- MsgBox "对不起,您没有使用此项功能的权限!", vbInformation, "提示窗口"
- Exit Sub
- End If
- Select Case m2(index).Caption
- Case "工资设置"
- Load main_gzsz_gzgs
- main_gzsz_gzgs.Show 1
- Case "奖励项目设置"
- jbxxtb = "奖励项目表"
- Load main_jbzl_public
- main_jbzl_public.Show 1
- Case "惩罚项目设置"
- jbxxtb = "惩罚项目表"
- Load main_jbzl_public
- main_jbzl_public.Show 1
- End Select
- End Sub
- Private Sub m3_Click(index As Integer)
- text = m3(index).Caption
- If blnPower(m3(index).Caption) = False Then
- MsgBox "对不起,您没有使用此项功能的权限!", vbInformation, "提示窗口"
- Exit Sub
- End If
- Select Case m3(index).Caption
- Case "人事信息管理"
- Load main_rsgl_rsdaxx
- main_rsgl_rsdaxx.Show 1
- Case "新员工登记"
- blnAddRS = True
- Load main_rsgl_rsdaxx_lr
- main_rsgl_rsdaxx_lr.Show 1
- Case "员工调动"
- Load main_rsgl_rsbd
- main_rsgl_rsbd.Show 1
- Case "员工离职"
- Load main_rsgl_zylz
- main_rsgl_zylz.Show 1
- Case "员工复职"
- Load main_rsgl_zyfz
- main_rsgl_zyfz.Show 1
- Case "培训管理"
- Load main_rsgl_pxgl
- main_rsgl_pxgl.Show 1
- Case "考核管理"
- Load main_rsgl_khgl
- main_rsgl_khgl.Show 1
- Case "合同管理"
- Load main_rsgl_htgl
- main_rsgl_htgl.Show 1
- Case "聘用管理"
- Load main_rsgl_pygl
- main_rsgl_pygl.Show 1
- Case "保险管理"
- Load main_rsgl_bxgl
- main_rsgl_bxgl.Show 1
- Case "合同到期处理"
- Cnn.Execute ("update 合同表 set 状态='到期' where 合同结束日期>" & Date)
- MsgBox "到期合同处理成功!", , "提示"
- Case "聘用到期处理"
- Cnn.Execute ("update 聘用表 set 状态='到期' where 聘用结束日期>" & Date)
- MsgBox "聘用到期处理成功!", , "提示"
- End Select
- End Sub
- Private Sub m4_Click(index As Integer)
- text = m4(index).Caption
- If blnPower(m4(index).Caption) = False Then
- MsgBox "对不起,您没有使用此项功能的权限!", vbInformation, "提示窗口"
- Exit Sub
- End If
- Select Case m4(index).Caption
- Case "过期数据处理"
- Load main_gzgl_gqsjcl
- main_gzgl_gqsjcl.Show 1
- Case "工资信息管理"
- Load main_gzgl_gzgl
- main_gzgl_gzgl.Show 1
- Case "建立新月份工资"
- Load main_gzgl_xyfgz
- main_gzgl_xyfgz.Show 1
- Case "员工奖励管理"
- Load main_gzgl_jlgl
- main_gzgl_jlgl.Show 1
- Case "员工惩罚管理"
- Load main_gzgl_cfgl
- main_gzgl_cfgl.Show 1
- Case "考勤信息管理"
- Load main_gzgl_kqgl
- main_gzgl_kqgl.Show 1
- End Select
- End Sub
- Private Sub m5_Click(index As Integer)
- text = m5(index).Caption
- If blnPower(m5(index).Caption) = False Then
- MsgBox "对不起,您没有使用此项功能的权限!", vbInformation, "提示窗口"
- Exit Sub
- End If
- Select Case m5(index).Caption
- Case "数据初始化"
- Load main_xtgl_sjcsh
- main_xtgl_sjcsh.Show 1
- Case "用户管理"
- Load main_xtgl_czqx
- main_xtgl_czqx.Show 1
- Case "口令设置"
- Load main_xtgl_mm
- main_xtgl_mm.Show 1
- Case "数据库备份与恢复"
- Shell App.Path & "数据备份与恢复.exe", 1
- Unload Me
- End Select
- End Sub
- Private Sub m6_Click(index As Integer)
- text = m6(index).Caption
- Select Case m6(index).Caption
- Case "记事本"
- Shell "notepad.exe", 1
- Case "计算器"
- Shell "CALC.EXE", 1
- Case "Office-Word"
- Dim newword As Word.Application
- Set newword = CreateObject("Word.application")
- newword.Documents.Add
- newword.Visible = True
- Case "Office-Excel"
- Dim newxls As Excel.Application
- Set newxls = CreateObject("Excel.Application") '创建excel应用程序,打开excel2000
- newxls.Workbooks.Add '创建工作簿
- newxls.Visible = True
- End Select
- End Sub
- Private Sub m7_Click(index As Integer)
- text = m7(index).Caption
- Select Case m7(index).Caption
- Case "帮助"
- CommonDialog1.HelpFile = App.Path & "/HELP.HLP"
- CommonDialog1.HelpCommand = cdlHelpContents
- CommonDialog1.ShowHelp ' 显示 Visual Basic 帮助目录主题
- Case "关于"
- Load frm_about
- frm_about.Show 1
- End Select
- End Sub
- Private Sub TreeView1_NodeClick(ByVal Node As MSComctlLib.Node)
- Label1 = Node.FullPath
- For b = 1 To Image1.UBound
- Image1(b).Visible = False
- lblCaption1(b).Visible = False
- lblCaption1(b).Caption = ""
- Next b
- For a = 1 To TreeView1.SelectedItem.Children
- Image1(a).Visible = True
- lblCaption1(a).Visible = True
- lblCaption1(a) = TreeView1.Nodes(TreeView1.SelectedItem.Child.index + a - 1).text
- Image1(a).Picture = LoadPicture(App.Path & "" & Node.text & "" & a & ".jpg")
- Image1(a).Left = Image1(0).Left + (Image1(a).Width + 420) * ((a - 1) Mod 4)
- lblCaption1(a).Left = Image1(a).Left
- Image1(a).Top = Int(a / 4.1) * (Image1(0).Height + 420) + Image1(0).Top
- lblCaption1(a).Top = Image1(a).Top + Image1(a).Height + 30
- Next a
- If TreeView1.SelectedItem.Key = "C1" Then
- m1_Click (0)
- End If
- For i = 2 To 4
- If TreeView1.SelectedItem.Key = "C" & i Then
- m1_Click (i)
- End If
- Next i
- For i = 6 To 8
- If TreeView1.SelectedItem.Key = "C" & i - 1 Then
- m1_Click (i)
- End If
- Next i
- For i = 10 To 13
- If TreeView1.SelectedItem.Key = "C" & i - 2 Then
- m1_Click (i)
- End If
- Next i
- For i = 12 To 14
- If TreeView1.SelectedItem.Key = "C" & i Then
- m2_Click (i - 12)
- End If
- Next i
- For i = 0 To 1
- If TreeView1.SelectedItem.Key = "C" & i + 15 Then
- m3_Click (i)
- End If
- Next i
- For i = 3 To 5
- If TreeView1.SelectedItem.Key = "C" & i + 14 Then
- m3_Click (i)
- End If
- Next i
- For i = 7 To 11
- If TreeView1.SelectedItem.Key = "C" & i + 13 Then
- m3_Click (i)
- End If
- Next i
- For i = 13 To 14
- If TreeView1.SelectedItem.Key = "C" & i + 12 Then
- m3_Click (i)
- End If
- Next i
- For i = 0 To 2
- If TreeView1.SelectedItem.Key = "C" & i + 27 Then
- m4_Click (i)
- End If
- Next i
- For i = 4 To 5
- If TreeView1.SelectedItem.Key = "C" & i + 26 Then
- m4_Click (i)
- End If
- Next i
- If TreeView1.SelectedItem.Key = "C32" Then
- m4_Click (7)
- End If
- For i = 0 To 3
- If TreeView1.SelectedItem.Key = "C" & i + 33 Then
- m5_Click (i)
- End If
- Next i
- For i = 0 To 3
- If TreeView1.SelectedItem.Key = "C" & i + 37 Then
- m6_Click (i)
- End If
- Next i
- For i = 0 To 1
- If TreeView1.SelectedItem.Key = "C" & i + 41 Then
- m7_Click (i)
- End If
- Next i
- End Sub