?? frmmain.frm
字號:
VERSION 5.00
Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0"; "Comdlg32.ocx"
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCTL.OCX"
Begin VB.MDIForm frmMain
BackColor = &H00808000&
Caption = "寧利標簽打印管理系統"
ClientHeight = 5355
ClientLeft = 1170
ClientTop = 1995
ClientWidth = 9045
Icon = "frmMain.frx":0000
LinkTopic = "MDIForm1"
StartUpPosition = 2 '屏幕中心
WindowState = 2 'Maximized
Begin MSComctlLib.Toolbar tbToolBar
Align = 1 'Align Top
Height = 630
Left = 0
TabIndex = 1
Top = 0
Width = 9045
_ExtentX = 15954
_ExtentY = 1111
ButtonWidth = 1455
ButtonHeight = 953
Appearance = 1
ImageList = "imgToolbarIcons"
_Version = 393216
BeginProperty Buttons {66833FE8-8583-11D1-B16A-00C0F0283628}
NumButtons = 8
BeginProperty Button1 {66833FEA-8583-11D1-B16A-00C0F0283628}
Caption = "退出系統"
Key = "退出系統"
Object.ToolTipText = "退出系統"
ImageIndex = 1
BeginProperty ButtonMenus {66833FEC-8583-11D1-B16A-00C0F0283628}
NumButtonMenus = 1
BeginProperty ButtonMenu1 {66833FEE-8583-11D1-B16A-00C0F0283628}
EndProperty
EndProperty
EndProperty
BeginProperty Button2 {66833FEA-8583-11D1-B16A-00C0F0283628}
Style = 3
EndProperty
BeginProperty Button3 {66833FEA-8583-11D1-B16A-00C0F0283628}
Caption = "標簽打印"
Key = "標簽打印"
Object.ToolTipText = "標簽打印"
ImageIndex = 4
EndProperty
BeginProperty Button4 {66833FEA-8583-11D1-B16A-00C0F0283628}
Caption = "人員設置"
Key = "人員設置"
Object.ToolTipText = "人員設置"
ImageIndex = 7
EndProperty
BeginProperty Button5 {66833FEA-8583-11D1-B16A-00C0F0283628}
Caption = "權限設置"
Key = "權限設置"
Object.ToolTipText = "權限設置"
ImageIndex = 8
EndProperty
BeginProperty Button6 {66833FEA-8583-11D1-B16A-00C0F0283628}
Caption = "密碼更改"
Key = "密碼更改"
Object.ToolTipText = "密碼更改"
ImageIndex = 9
EndProperty
BeginProperty Button7 {66833FEA-8583-11D1-B16A-00C0F0283628}
Caption = "重新登錄"
Key = "重新登錄"
Object.ToolTipText = "重新登錄"
ImageIndex = 10
EndProperty
BeginProperty Button8 {66833FEA-8583-11D1-B16A-00C0F0283628}
Caption = "系統日志"
Key = "系統日志"
Object.ToolTipText = "系統日志"
ImageIndex = 11
EndProperty
EndProperty
End
Begin MSComctlLib.StatusBar sbStatusBar
Align = 2 'Align Bottom
Height = 270
Left = 0
TabIndex = 0
Top = 5085
Width = 9045
_ExtentX = 15954
_ExtentY = 476
_Version = 393216
BeginProperty Panels {8E3867A5-8586-11D1-B16A-00C0F0283628}
NumPanels = 4
BeginProperty Panel1 {8E3867AB-8586-11D1-B16A-00C0F0283628}
AutoSize = 1
Object.Width = 7408
Text = "*信息窗:"
TextSave = "*信息窗:"
EndProperty
BeginProperty Panel2 {8E3867AB-8586-11D1-B16A-00C0F0283628}
AutoSize = 2
Object.Width = 2884
MinWidth = 2894
Text = "當前用戶:"
TextSave = "當前用戶:"
EndProperty
BeginProperty Panel3 {8E3867AB-8586-11D1-B16A-00C0F0283628}
Style = 6
AutoSize = 2
Picture = "frmMain.frx":0442
TextSave = "2006-06-01"
EndProperty
BeginProperty Panel4 {8E3867AB-8586-11D1-B16A-00C0F0283628}
Style = 5
AutoSize = 2
Picture = "frmMain.frx":0766
TextSave = "00:36"
EndProperty
EndProperty
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋體"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
End
Begin MSComDlg.CommonDialog dlgCommonDialog
Left = 480
Top = 2160
_ExtentX = 847
_ExtentY = 847
_Version = 393216
FontSize = 9
End
Begin MSComctlLib.ImageList imgToolbarIcons
Left = 1260
Top = 2130
_ExtentX = 1005
_ExtentY = 1005
BackColor = -2147483643
ImageWidth = 16
ImageHeight = 16
MaskColor = 12632256
_Version = 393216
BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628}
NumListImages = 12
BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmMain.frx":0A8A
Key = ""
EndProperty
BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmMain.frx":0B96
Key = ""
EndProperty
BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmMain.frx":0EEA
Key = ""
EndProperty
BeginProperty ListImage4 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmMain.frx":123E
Key = ""
EndProperty
BeginProperty ListImage5 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmMain.frx":1592
Key = ""
EndProperty
BeginProperty ListImage6 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmMain.frx":18E6
Key = ""
EndProperty
BeginProperty ListImage7 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmMain.frx":1C3A
Key = ""
EndProperty
BeginProperty ListImage8 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmMain.frx":1F8E
Key = ""
EndProperty
BeginProperty ListImage9 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmMain.frx":22E2
Key = ""
EndProperty
BeginProperty ListImage10 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmMain.frx":2636
Key = ""
EndProperty
BeginProperty ListImage11 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmMain.frx":298A
Key = ""
EndProperty
BeginProperty ListImage12 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmMain.frx":2CDE
Key = ""
EndProperty
EndProperty
End
Begin VB.Menu mnubqdy
Caption = "標簽管理"
Begin VB.Menu mnuabgl
Caption = "安標管理"
End
Begin VB.Menu mnuddsj
Caption = "生產任務管理"
End
Begin VB.Menu mnupn
Caption = "PN表管理"
End
Begin VB.Menu mnuhb
Caption = "環標數據管理"
End
Begin VB.Menu mnubqsl
Caption = "標簽數量管理"
End
Begin VB.Menu mnuabfw
Caption = "安標范圍管理"
End
Begin VB.Menu mnubqprint
Caption = "標簽打印"
End
Begin VB.Menu mnnbar0
Caption = "-"
End
Begin VB.Menu mnuexit
Caption = "退出系統"
End
End
Begin VB.Menu mnuSystemSet
Caption = "系統設置(&S)"
Begin VB.Menu mnuprint
Caption = "打印機紙張類型"
End
Begin VB.Menu mnut
Caption = "-"
End
Begin VB.Menu mnuPeopSet
Caption = "人員設置"
End
Begin VB.Menu mnuSystemBar2
Caption = "-"
End
Begin VB.Menu mnuPurviewSet
Caption = "權限設置"
End
Begin VB.Menu mnuSystemBar3
Caption = "-"
End
Begin VB.Menu mnuPswdChg
Caption = "密碼更改"
End
End
Begin VB.Menu mnuProtect
Caption = "系統維護(&P)"
Begin VB.Menu mnuRelogin
Caption = "重新登錄"
End
Begin VB.Menu mnuProtectBar1
Caption = "-"
End
Begin VB.Menu mnuBackup
Caption = "數據備份"
Begin VB.Menu mnuAutoBackup
Caption = "定時備份"
End
Begin VB.Menu mnuManuBackup
Caption = "手工備份"
End
End
Begin VB.Menu mnuRestore
Caption = "數據恢復"
End
Begin VB.Menu mnuProtectBar2
Caption = "-"
End
Begin VB.Menu mnuViewToolBar
Caption = "工具欄"
End
Begin VB.Menu mnuViewStatusBar
Caption = "狀態欄"
End
End
Begin VB.Menu mnuHelp
Caption = "幫助(&H)"
Begin VB.Menu mnuHelpTopic
Caption = "幫助主題"
End
Begin VB.Menu mnuHelpBar1
Caption = "-"
End
Begin VB.Menu mnuSystemlog
Caption = "系統日志"
End
Begin VB.Menu mnuHelpAbout
Caption = "關于(&A) "
End
End
End
Attribute VB_Name = "frmMain"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Declare Function OSWinHelp% Lib "user32" Alias "WinHelpA" (ByVal hwnd&, ByVal HelpFile$, ByVal wCommand%, dwData As Any)
''Private Declare Function WinExec Lib "kernel32" (ByVal lpCmdLine As String, ByVal nCmdShow As Long) As Long '這方法也可以
''Const EM_UNDO = &HC7
Private Declare Function GetSystemDirectory Lib "kernel32" Alias "GetSystemDirectoryA" (ByVal lpBuffer As String, ByVal nSize As Long) As Long
Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long
Private Declare Function GetDesktopWindow Lib "user32" () As Long
Dim rsMain, rsTmp As ADODB.Recordset '用于主窗口
Private Sub MDIForm_Load()
Dim ExistFile As String
'Dim fso As New FileSystemObject
Dim i As Integer
Me.Left = GetSetting(App.Title, "Settings", "MainLeft", 1000)
Me.Top = GetSetting(App.Title, "Settings", "MainTop", 1000)
Me.Width = GetSetting(App.Title, "Settings", "MainWidth", 6500)
Me.Height = GetSetting(App.Title, "Settings", "MainHeight", 6500)
mnuViewToolBar.Checked = True '設置初始值
mnuViewStatusBar.Checked = True
tbToolBar.Visible = mnuViewToolBar.Checked
sbStatusBar.Visible = mnuViewStatusBar.Checked
sbStatusBar.Panels(2).Text = "當前用戶: " + UserName
'ExistFile = Dir(SystemDir + "\Data\Manufact.mdb") '若文件被破壞,則先恢復
'If ExistFile = "" Then
' fso.CopyFile SystemDir + "\Data\Manufactbak.mdb", SystemDir + "\Data\Manufact.mdb", True '數據文件
'End If
'將模塊權限與菜單、按鈕相結合
'*例 mnuViewToolbar.Enabled = False tbToolBar.Buttons(1).Enabled = False
Set rsTmp = New ADODB.Recordset '先利用 rsTmp 獲得有關系數
rsTmp.CursorType = adOpenKeyset
rsTmp.LockType = adLockOptimistic
rsTmp.Open "Select * From 用戶權限", cnSys
rsTmp.Find "用戶帳號='" & UserName & "'"
If IsNull(rsTmp("使用模塊")) Or IsEmpty(rsTmp("使用模塊")) Then
PurvString = "111111111111111" '缺省值為擁有所有模塊
Else
PurvString = Trim(rsTmp("使用模塊"))
End If
rsTmp.Close
For i = 1 To Len(PurvString)
If Mid(PurvString, i, 1) = "1" Then
Call MenuButtSet(i, True)
Else
Call MenuButtSet(i, False)
End If
Next i
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -