?? frm側邊欄.frm
字號:
VERSION 5.00
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCTL.OCX"
Object = "{E0A0BB77-0F89-427B-8CEB-5A1F420544FE}#1.0#0"; "prjExplorerBar.ocx"
Begin VB.Form frm側邊欄
BorderStyle = 0 'None
Caption = "側邊欄"
ClientHeight = 5535
ClientLeft = 0
ClientTop = 0
ClientWidth = 2700
LinkTopic = "Form1"
MDIChild = -1 'True
ScaleHeight = 5535
ScaleWidth = 2700
ShowInTaskbar = 0 'False
Begin VB.Timer Timer2
Interval = 50
Left = 1200
Top = 1800
End
Begin VB.Timer Timer1
Interval = 50
Left = 240
Top = 1680
End
Begin MSComctlLib.ImageList ImageList1
Left = 1440
Top = 4200
_ExtentX = 1005
_ExtentY = 1005
BackColor = -2147483643
ImageWidth = 16
ImageHeight = 16
MaskColor = 12632256
_Version = 393216
BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628}
NumListImages = 13
BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frm側邊欄.frx":0000
Key = ""
EndProperty
BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frm側邊欄.frx":08DA
Key = ""
EndProperty
BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frm側邊欄.frx":395C
Key = ""
EndProperty
BeginProperty ListImage4 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frm側邊欄.frx":49AE
Key = ""
EndProperty
BeginProperty ListImage5 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frm側邊欄.frx":7160
Key = ""
EndProperty
BeginProperty ListImage6 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frm側邊欄.frx":85E2
Key = ""
EndProperty
BeginProperty ListImage7 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frm側邊欄.frx":8B7C
Key = ""
EndProperty
BeginProperty ListImage8 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frm側邊欄.frx":9116
Key = ""
EndProperty
BeginProperty ListImage9 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frm側邊欄.frx":B250
Key = ""
EndProperty
BeginProperty ListImage10 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frm側邊欄.frx":C2A2
Key = ""
EndProperty
BeginProperty ListImage11 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frm側邊欄.frx":F12C
Key = ""
EndProperty
BeginProperty ListImage12 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frm側邊欄.frx":F6C6
Key = ""
EndProperty
BeginProperty ListImage13 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frm側邊欄.frx":FC60
Key = ""
EndProperty
EndProperty
End
Begin Project1.ctlExplorerBar XPmenu
Height = 10095
Left = 0
TabIndex = 0
Top = 0
Width = 2700
_ExtentX = 4763
_ExtentY = 17806
End
End
Attribute VB_Name = "frm側邊欄"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim l As Integer
Private Sub Form_Load()
XPmenu.AddSpecialItem "系統(S)", , ImageList1.ListImages(1).Picture '隔離條名稱,圖片,下拉欄圖片
XPmenu.AddSubItem 1, "系統日志", ImageList1.ListImages(2).Picture
XPmenu.AddSubItem 1, "用戶管理", ImageList1.ListImages(3).Picture
XPmenu.AddSubItem 1, "修改密碼", ImageList1.ListImages(4).Picture
XPmenu.AddSubItem 1, "退出系統", ImageList1.ListImages(12).Picture
XPmenu.AddNormalItem "數據維護(D)", True '隔離條名稱
XPmenu.AddSubItem 2, "增加", ImageList1.ListImages(6).Picture
XPmenu.AddSubItem 2, "修改", ImageList1.ListImages(7).Picture
XPmenu.AddSubItem 2, "刪除", ImageList1.ListImages(8).Picture
XPmenu.AddSubItem 2, "數據備份", ImageList1.ListImages(9).Picture
XPmenu.AddSubItem 2, "恢復備份", ImageList1.ListImages(10).Picture
XPmenu.AddSubItem 2, "數據初始化", ImageList1.ListImages(13).Picture
XPmenu.AddNormalItem "幫助(H)", False '隔離條名稱
XPmenu.AddSubItem 3, "...關于(A)...", ImageList1.ListImages(11).Picture
End Sub
Private Sub Form_Resize()
XPmenu.Height = Me.Height
End Sub
Private Sub XPmenu_SubItemClick(ByVal Index As Integer, ByVal SubItemIndex As Integer)
Select Case Index
Case 1
Select Case SubItemIndex
Case 1
frm開始.Line4.Visible = True
FrmLogMan.Show
Timer1.Enabled = False
Timer2.Enabled = True
Case 2
Timer1.Enabled = False
Timer2.Enabled = True
If CurUser.User_type = 4 Then
MsgBox "沒有足夠能的權限"
Else
FrmUserMan.Show 1
End If
Case 3
Timer1.Enabled = False
Timer2.Enabled = True
With FrmUserEdit
.Caption = "修改密碼"
.OriUser = CurUser.name
.txtUserName = CurUser.name
If CurUser.User_type = 1 Then
.ComboType.AddItem "超級用戶"
ElseIf CurUser.User_type = 2 Then
.ComboType.AddItem "系統管理員"
ElseIf CurUser.User_type = 3 Then
.ComboType.AddItem "系統操作員"
Else
.ComboType.AddItem "普通用戶"
End If
.ComboType.ListIndex = 0
.ComboType.Enabled = False
.txtUserName = Trim(CurUser.name) '用戶名
.txtUserName.Enabled = False '不允許修改用戶名
.Modify = True
.Show 1
End With
'添加系統日志信息
MyLog.Title = "成員:" + Trim(Me.Caption)
MyLog.Body = "修改用戶密碼"
MyLog.LogType = "修改"
MyLog.UserName = CurUser.name
MyLog.Save
Case 4
Dim yn As String
yn = MsgBox("確定要退出系統嗎?", vbYesNo, "退出確定")
If yn = vbYes Then
End
End If
End Select
Case 2
Select Case SubItemIndex
Case 1
Timer1.Enabled = False
Timer2.Enabled = True
If CurUser.User_type = 4 Then
MsgBox "沒有足夠能的權限"
Else
frm增加.Cmbbm.Text = ""
frm增加.txtxm.Text = ""
frm增加.txtdx.Text = ""
frm增加.txtbt.Text = ""
frm增加.txtjj.Text = ""
frm增加.txtft.Text = ""
frm增加.txtylbx.Text = ""
frm增加.txtylbxj.Text = ""
frm增加.txtzfgjj.Text = ""
frm增加.Show 1
End If
Case 2
Timer1.Enabled = False
Timer2.Enabled = True
If CurUser.User_type = 4 Or CurUser.User_type = 3 Then
MsgBox "沒有足夠能的權限"
Else
frm修改.Show 1
End If
Case 3
Timer1.Enabled = False
Timer2.Enabled = True
If CurUser.User_type = 4 Or CurUser.User_type = 3 Or CurUser.User_type = 2 Then
MsgBox "沒有足夠能的權限"
Else
frm刪除.cmbxm.Text = ""
frm刪除.txtbm = ""
frm刪除.txtdx = ""
frm刪除.txtbt = ""
frm刪除.txtjj = ""
frm刪除.txtft = ""
frm刪除.txtylbx = ""
frm刪除.txtylbxj = ""
frm刪除.txtzfgjj = ""
frm刪除.txtyf = ""
frm刪除.txtsds = ""
frm刪除.txtsf = ""
frm刪除.Show 1
End If
Case 4
If CurUser.User_type <> 1 Then
MsgBox "沒有足夠能的權限"
Else
Dim mfile As String, mfile2 As String
On Error Resume Next
MkDir App.Path + "\Backup"
mfile = App.Path & "\data\職工工資管理.mdb"
mfile2 = App.Path & "\Backup\$Back%.inf"
If Trim(mfile2) = "" Then Exit Sub
If Dir(mfile2) <> "" Then
If MsgBox(Dir(mfile2) & " 文件已經存在,是否替換?", vbYesNo, "警告") = vbNo Then Exit Sub
End If
Dim buff() As Byte, i As Long
i = FileLen(mfile)
ReDim buff(i - 1)
Open mfile For Binary As #1
Get #1, , buff
Close #1
Open mfile2 For Binary As #1
Put #1, , buff
Close #1
MsgBox "備份完畢!"
'添加系統日志信息
MyLog.Title = "成員:備份當前數據庫記錄"
MyLog.Body = "數據備份"
MyLog.LogType = "數據備份"
MyLog.UserName = CurUser.name
MyLog.Save
End If
Case 5
If CurUser.User_type <> 1 Then
MsgBox "沒有足夠能的權限"
Else
On Error Resume Next
mfile = App.Path + "\Backup\$Back%.inf"
mfile2 = App.Path + "\data\職工工資管理.mdb"
If Dir(mfile) = "" Then
MsgBox "沒有發現可以恢復的數據庫!", vbOKOnly + vbCritical, "警告"
RmDir App.Path + "\Backup"
ElseIf Dir(mfile) <> "" Then
If MsgBox("確定要恢復備份文件嗎?", vbYesNo, "請確認") = vbYes Then
i = FileLen(mfile)
ReDim buff(i - 1)
Open mfile For Binary As #1
Get #1, , buff
Close #1
Open mfile2 For Binary As #1
Put #1, , buff
Close #1
Kill App.Path + "\Backup\$Back%.inf"
MsgBox "恢復備份成功"
RmDir App.Path + "\Backup"
End If
End If
'添加系統日志信息
MyLog.Title = "成員:恢復數據庫記錄"
MyLog.Body = "恢復備份"
MyLog.LogType = "恢復備份"
MyLog.UserName = CurUser.name
MyLog.Save
End If
Case 6
If CurUser.User_type <> 1 Then
MsgBox "沒有足夠能的權限"
Else
End If
End Select
Case 3
Select Case SubItemIndex
Case 1
Timer1.Enabled = False
Timer2.Enabled = True
frm關于.Show 1
End Select
End Select
End Sub
Private Sub Timer1_Timer()
If l = 0 Then
Timer1.Enabled = False
Exit Sub
End If
l = l + 1
frm側邊欄.Visible = True
frm側邊欄.Height = frm開始.ScaleHeight
frm側邊欄.Left = frm側邊欄.Left + 360 '292.5
End Sub
Private Sub Timer2_Timer()
If l = -10 Then
Timer2.Enabled = False
frm側邊欄.Visible = False
Exit Sub
End If
l = l - 1
frm側邊欄.Left = frm側邊欄.Left - 360 ' 292.5
End Sub
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -