?? frmmain.frm
字號:
backcolor = 13752539
mousedowncolor = 12363422
mouseoncolor = 14204854
stylecolor = 6956042
style3dcolor1 = 6956042
style3dcolor2 = 6956042
font = "frmMain.frx":7A98
picture = "frmMain.frx":7ABC
End
Begin MySuperMarket.XButton tbLeft
Height = 330
Index = 5
Left = 3960
TabIndex = 18
Top = 30
Width = 765
_extentx = 1349
_extenty = 582
caption = "會員"
tooltip = "會員管理"
backcolor = 13752539
mousedowncolor = 12363422
mouseoncolor = 14204854
stylecolor = 6956042
style3dcolor1 = 6956042
style3dcolor2 = 6956042
font = "frmMain.frx":8056
picture = "frmMain.frx":807A
End
Begin MySuperMarket.XButton tbLeft
Height = 330
Index = 6
Left = 4770
TabIndex = 19
Top = 30
Width = 765
_extentx = 1349
_extenty = 582
caption = "用戶"
tooltip = "用戶管理"
backcolor = 13752539
mousedowncolor = 12363422
mouseoncolor = 14204854
stylecolor = 6956042
style3dcolor1 = 6956042
style3dcolor2 = 6956042
font = "frmMain.frx":8614
picture = "frmMain.frx":8638
End
Begin MySuperMarket.XButton tbExit
Height = 330
Left = 6090
TabIndex = 20
Top = 30
Width = 345
_extentx = 609
_extenty = 582
caption = ""
tooltip = "退出本程序"
backcolor = 13752539
mousedowncolor = 12363422
mouseoncolor = 14204854
stylecolor = 6956042
style3dcolor1 = 6956042
style3dcolor2 = 6956042
font = "frmMain.frx":8BD2
picture = "frmMain.frx":8BF6
End
Begin MySuperMarket.XButton cmdAbout
Height = 330
Left = 5700
TabIndex = 21
Top = 30
Width = 345
_extentx = 609
_extenty = 582
caption = ""
tooltip = "關于本軟件"
backcolor = 13752539
mousedowncolor = 12363422
mouseoncolor = 14204854
stylecolor = 6956042
style3dcolor1 = 6956042
style3dcolor2 = 6956042
font = "frmMain.frx":9190
picture = "frmMain.frx":91B4
End
Begin VB.Line Line2
BorderColor = &H00A6A6A6&
X1 = 374
X2 = 374
Y1 = 3
Y2 = 23
End
Begin VB.Line Line1
BorderColor = &H00A6A6A6&
X1 = 42
X2 = 42
Y1 = 3
Y2 = 23
End
End
Begin VB.Menu mnuFile
Caption = "文件(&F)"
Begin VB.Menu mnuLogin
Caption = "返回登陸界面(&R)"
Shortcut = ^R
End
Begin VB.Menu mnuFileSP1
Caption = "-"
End
Begin VB.Menu mnuDBBackUp
Caption = "備份數據庫"
End
Begin VB.Menu mnuDBResume
Caption = "恢復數據庫"
End
Begin VB.Menu mnuFileSP2
Caption = "-"
End
Begin VB.Menu mnuExit
Caption = "退出(&X)"
End
End
Begin VB.Menu mnuView
Caption = "視圖(&V)"
Begin VB.Menu mnuLeft
Caption = "商品管理(&M)"
Index = 1
Shortcut = ^M
End
Begin VB.Menu mnuLeft
Caption = "進貨管理(&P)"
Index = 2
Shortcut = ^P
End
Begin VB.Menu mnuLeft
Caption = "銷售管理(&S)"
Index = 3
Shortcut = ^S
End
Begin VB.Menu mnuLeft
Caption = "廠商/供貨商(&F)"
Index = 4
Shortcut = ^F
End
Begin VB.Menu mnuLeft
Caption = "會員管理(&E)"
Index = 5
Shortcut = ^E
End
Begin VB.Menu mnuLeft
Caption = "用戶管理(&U)"
Index = 6
Shortcut = ^U
End
Begin VB.Menu mnuViewSP1
Caption = "-"
End
Begin VB.Menu mnuGuide
Caption = "導航欄(&G)"
Checked = -1 'True
Shortcut = ^G
End
Begin VB.Menu mnuTB
Caption = "工具條(&T)"
Checked = -1 'True
Shortcut = ^T
End
Begin VB.Menu mnuSB
Caption = "狀態欄(&B)"
Checked = -1 'True
Shortcut = ^B
End
End
Begin VB.Menu mnuHelp
Caption = "幫助(&H)"
Begin VB.Menu mnuContent
Caption = "內容(&C)"
Shortcut = {F1}
End
Begin VB.Menu mnuSupply
Caption = "技術支持(&S)"
End
Begin VB.Menu mnuHelpSP1
Caption = "-"
End
Begin VB.Menu mnuAbout
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
'程序開發:lc_mtt
'CSDN博客:http://blog.csdn.net/lc_mtt/
'個人主頁:http://www.3lsoft.com
'郵箱:3lsoft@163.com
'注:此代碼禁止用于商業用途。有修改者發我一份,謝謝!
'---------------- 開源世界,你我更進步 ----------------
'拖動窗體的API
Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long
Private Declare Function ReleaseCapture Lib "user32" () As Long
Dim CanResize As Boolean
Dim LastFrm As Long
Private Sub cmdAbout_Click()
mnuAbout_Click
End Sub
Private Sub cmdClose_Click()
picLeft.Visible = False
mnuGuide.Checked = False
SaveINI "Main", "Guide", "n"
End Sub
Public Sub cmdLeft_Click(Index As Integer)
If LastFrm = Index Then Exit Sub
If LastFrm > 0 Then
cmdLeft(LastFrm).IfDraw = False
tbLeft(LastFrm).IfDraw = False
mnuLeft(LastFrm).Checked = False
cmdLeft(LastFrm).BackColor = picLeft.BackColor
tbLeft(LastFrm).BackColor = picTB.BackColor
Else
Unload frmWelcome
End If
Select Case LastFrm
Case 1: Unload frmMerch
Case 2: Unload frmStock
Case 3: Unload frmSale
Case 4: Unload frmFP
Case 5: Unload frmMember
Case 6: Unload frmUser
End Select
LastFrm = Index
cmdLeft(Index).IfDraw = True
tbLeft(Index).IfDraw = True
mnuLeft(Index).Checked = True
cmdLeft(Index).BackColor = 14210516
tbLeft(Index).BackColor = 14210516
SetSB 1, "現在位置:" & cmdLeft(Index).caption
Select Case Index
Case 1: frmMerch.Show
Case 2: frmStock.Show
Case 3: frmSale.Show
Case 4: frmFP.Show
Case 5: frmMember.Show
Case 6: frmUser.Show
End Select
End Sub
Private Sub imgLB_MouseDown(Button As Integer, Shift As Integer, x As Single, y As Single)
If Button = 1 Then
Call ReleaseCapture
Call SendMessage(hwnd, &HA1, 17, 0)
End If
End Sub
Private Sub imgLogin_Click()
End Sub
Private Sub MDIForm_Load()
'讀取窗體位置,視圖信息
If GetINI("Main", "Left") = "" Then
Move (Screen.Width - Me.Width) / 2, (Screen.Height - Me.Height) / 2
Else
Move GetLongINI("Main", "Left"), GetLongINI("Main", "Top"), GetLongINI("Main", "Width"), GetLongINI("Main", "Height")
Dim j As Long
j = GetLongINI("Main", "WindowState")
If j = 2 Then Me.WindowState = 2
End If
CanResize = True
If GetINI("Main", "Guide") = "n" Then
picLeft.Visible = False
mnuGuide.Checked = False
End If
If GetINI("Main", "ToolBar") = "n" Then
picTB.Visible = False
mnuTB.Checked = False
End If
If GetINI("Main", "StateBar") = "n" Then
picSB.Visible = False
mnuSB.Checked = False
End If
'判斷用戶類型
cmdLeft(6).Enabled = (curUserStyle >= 3)
tbLeft(6).Enabled = (curUserStyle >= 3)
mnuLeft(6).Enabled = (curUserStyle >= 3)
frmWelcome.Show
End Sub
Private Sub MDIForm_Resize()
On Error Resume Next
If CanResize = False Then Exit Sub
If Me.Width < 9900 Then Me.Width = 9900
If Me.Height < 8370 Then Me.Height = 8370
SaveINI "Main", "WindowState", CStr(WindowState)
If Me.WindowState = 0 Then
SaveINI "Main", "Width", CStr(Width)
SaveINI "Main", "Height", CStr(Height)
End If
End Sub
Private Sub MDIForm_Unload(Cancel As Integer)
On Error Resume Next
If Left >= 0 Then SaveINI "Main", "Left", CStr(Left)
If Top >= 0 Then SaveINI "Main", "Top", CStr(Top)
cnMain.Close
Set frmMain = Nothing
End Sub
Private Sub mnuAbout_Click()
MsgBox "02計本(2) 獨立開發完成。", vbInformation
End Sub
Private Sub mnuContent_Click()
MsgBox "暫無幫助!", vbInformation
End Sub
Private Sub mnuExit_Click()
Unload Me
End Sub
Private Sub mnuGuide_Click()
mnuGuide.Checked = Not mnuGuide.Checked
picLeft.Visible = mnuGuide.Checked
SaveINI "Main", "Guide", IIf(mnuGuide.Checked = True, "", "n")
End Sub
Private Sub mnuLeft_Click(Index As Integer)
cmdLeft_Click Index
End Sub
Private Sub mnuLogin_Click()
On Error Resume Next
Unload Me
frmLogin.Show
End Sub
Private Sub picSB_Resize()
On Error Resume Next
Shb2.Width = Me.Width / 15 - IIf(Me.WindowState = 2, 210, 230)
imgLB.Visible = (Me.WindowState <> 2)
imgLB.Left = Me.Width / 15 - 20
End Sub
Private Sub mnuSB_Click()
mnuSB.Checked = Not mnuSB.Checked
picSB.Visible = mnuSB.Checked
SaveINI "Main", "StateBar", IIf(mnuSB.Checked = True, "", "n")
End Sub
Private Sub mnuTB_Click()
mnuTB.Checked = Not mnuTB.Checked
picTB.Visible = mnuTB.Checked
SaveINI "Main", "ToolBar", IIf(mnuTB.Checked = True, "", "n")
End Sub
Private Sub picLeft_Resize()
On Error Resume Next
ShLeft.Height = picLeft.Height / 15 - 23
End Sub
Private Sub tbExit_Click()
mnuExit_Click
End Sub
Private Sub tbLeft_Click(Index As Integer)
cmdLeft_Click Index
End Sub
Private Sub tbLogin_Click()
mnuLogin_Click
End Sub
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -