📄 mdimain.frm
字号:
BeginProperty ListImage10 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "MDIMain.frx":3937
Key = ""
EndProperty
BeginProperty ListImage11 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "MDIMain.frx":3B1A
Key = ""
EndProperty
BeginProperty ListImage12 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "MDIMain.frx":3D00
Key = ""
EndProperty
BeginProperty ListImage13 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "MDIMain.frx":3ECD
Key = ""
EndProperty
EndProperty
End
Begin VB.Menu mnuSystem
Caption = "&S.系统"
Begin VB.Menu mnuWeb
Caption = "网络属性(&N)..."
End
Begin VB.Menu mnuUser
Caption = "用户属性(&U)..."
End
Begin VB.Menu mnuHistroy
Caption = "日志..."
End
Begin VB.Menu mnuPrintSet
Caption = "打印..."
Enabled = 0 'False
Shortcut = ^P
End
Begin VB.Menu mnuline1
Caption = "-"
End
Begin VB.Menu mnuLogout
Caption = "注销(&L)..."
End
Begin VB.Menu mnuExit
Caption = "退出"
Shortcut = ^Q
End
End
Begin VB.Menu mnuManage
Caption = "&M.管理"
End
Begin VB.Menu mnuFind
Caption = "&F.查询"
Begin VB.Menu mnuSelect
Caption = "查询分析"
Shortcut = ^F
End
End
Begin VB.Menu mnuWindow
Caption = "&W.视图"
WindowList = -1 'True
Begin VB.Menu mnuTool
Caption = "工具栏(&T)"
Index = 0
End
Begin VB.Menu mnuTool
Caption = "状态栏(&S)"
Index = 1
End
Begin VB.Menu mnuLine3
Caption = "-"
End
Begin VB.Menu mnuIcon
Caption = "层叠排列(&C)"
Index = 0
End
Begin VB.Menu mnuIcon
Caption = "平铺排列(&H)"
Index = 1
End
Begin VB.Menu mnuline5
Caption = "-"
End
Begin VB.Menu mnuClose
Caption = "全部关闭"
Shortcut = ^C
End
End
Begin VB.Menu mnuHelps
Caption = "&H.帮助"
Begin VB.Menu mnuHelp
Caption = "帮助主题"
Shortcut = ^H
End
Begin VB.Menu mnuLine2
Caption = "-"
End
Begin VB.Menu mnuAbout
Caption = "关于"
Shortcut = ^A
End
End
End
Attribute VB_Name = "MDIMain"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Dim intCount As Integer
Dim strText As String
Dim intButton As Integer
Dim intCmdIndex As Integer
Dim intMove As Integer
Dim intMenuMove As Integer
Private Sub subMenu()
intMenuMove = intMove
Select Case intCmdIndex
Case 0:
For intCount = 0 To 2
tbrMenu(intCount).Visible = True
lblMenu(intCount).Visible = True
tbrMenu(intCount).Top = 600 + intMenuMove
lblMenu(intCount).Top = 1560 + intMenuMove
intMenuMove = intMenuMove + 1320
Next
For intCount = 3 To 11
tbrMenu(intCount).Visible = False
lblMenu(intCount).Visible = False
Next
Case 1:
For intCount = 0 To 2
tbrMenu(intCount).Visible = False
lblMenu(intCount).Visible = False
Next
For intCount = 3 To 7
tbrMenu(intCount).Visible = True
lblMenu(intCount).Visible = True
tbrMenu(intCount).Top = 975 + intMenuMove
lblMenu(intCount).Top = 1935 + intMenuMove
intMenuMove = intMenuMove + 1320
Next
For intCount = 8 To 11
tbrMenu(intCount).Visible = False
lblMenu(intCount).Visible = False
Next
Case 2:
For intCount = 0 To 8
tbrMenu(intCount).Visible = False
lblMenu(intCount).Visible = False
Next
For intCount = 9 To 11
tbrMenu(intCount).Visible = True
lblMenu(intCount).Visible = True
tbrMenu(intCount).Top = 1350 + intMenuMove
lblMenu(intCount).Top = 2310 + intMenuMove
intMenuMove = intMenuMove + 1320
Next
End Select
Call MDIForm_Resize
End Sub
Private Sub cmdMenu_Click(Index As Integer)
If intCmdIndex = Index Then Exit Sub
intMenuMove = 0
intMove = 0
intCmdIndex = Index
picMenu.Picture = iltBottom.ListImages(Index + 1).Picture
Call subMenu
End Sub
Private Sub imgArr_Click(Index As Integer)
intMove = intMove + IIf(Index = 0, -660, 660)
Call subMenu
End Sub
Private Sub imgArr_MouseDown(Index As Integer, Button As Integer, Shift As Integer, X As Single, Y As Single)
imgArr(Index).Left = 1330
imgArr(Index).Picture = iltarr.ListImages(Index + 1).Picture
End Sub
Private Sub imgArr_MouseUp(Index As Integer, Button As Integer, Shift As Integer, X As Single, Y As Single)
imgArr(Index).Left = 1320
imgArr(Index).Picture = iltarr.ListImages(Index + 3).Picture
End Sub
Private Sub MDIForm_Load()
On Error Resume Next
intButton = 2
MDIMain.Icon = frmTool.Icon
If blnBoot(3) = True Then
Me.Left = GetSetting(App.Title, "Settings", "MainLeft", 1000)
Me.Top = GetSetting(App.Title, "Settings", "MainTop", 1000)
Me.Width = GetSetting(App.Title, "Settings", "MainWidth", 8500)
Me.Height = GetSetting(App.Title, "Settings", "MainHeight", 6500)
mnuTool(0).Checked = blnBoot(4)
tbrTool.Visible = blnBoot(5)
mnuTool(1).Checked = blnBoot(5)
staInfo.Visible = blnBoot(6)
mnuTool(2).Checked = blnBoot(6)
If blnBoot(7) = True Then mnuIcon(0).Checked = True Else mnuIcon(1).Checked = True
End If
imgArr(0).Picture = iltarr.ListImages(3).Picture
imgArr(1).Picture = iltarr.ListImages(4).Picture
imgArr(0).Visible = False
imgArr(1).Visible = False
blnLogout = True
If mnuIcon(0).Checked = True Then
Me.Arrange 0
Else
Me.Arrange 1
End If
intCmdIndex = 1
intMove = 0
Call cmdMenu_Click(0)
Exit Sub
ErrHandle:
MsgBox "错误:" & Err.Number & vbCrLf & Err.Description, vbOKOnly + vbExclamation, "运行错误"
End Sub
Private Sub MDIForm_QueryUnload(Cancel As Integer, UnloadMode As Integer)
If blnLogout = True Then
If MsgBox("确认要退出吗?(Y/N)", vbInformation + vbYesNo, App.Title) = vbNo Then
Cancel = True
Exit Sub
End If
End If
End Sub
Private Sub MDIForm_Resize()
On Error Resume Next
Select Case intCmdIndex
Case 0:
cmdMenu(2).Top = Me.ScaleHeight - 375
cmdMenu(1).Top = cmdMenu(2).Top - 375
imgArr(1).Visible = IIf(tbrMenu(0).Top < 600, True, False)
imgArr(1).Top = 720
imgArr(0).Visible = IIf(lblMenu(2).Top + 200 > cmdMenu(1).Top, True, False)
imgArr(0).Top = cmdMenu(1).Top - 360
Case 1:
cmdMenu(1).Top = 375
cmdMenu(2).Top = Me.ScaleHeight - 375
imgArr(1).Visible = IIf(tbrMenu(3).Top < 975, True, False)
imgArr(1).Top = 1095
imgArr(0).Visible = IIf(lblMenu(7).Top + 200 > cmdMenu(2).Top, True, False)
imgArr(0).Top = cmdMenu(2).Top - 360
Case 2:
cmdMenu(1).Top = 375
cmdMenu(2).Top = 750
imgArr(1).Visible = IIf(tbrMenu(9).Top < 1350, True, False)
imgArr(1).Top = 1470
imgArr(0).Visible = IIf(lblMenu(11).Top + 200 > Me.ScaleHeight, True, False)
imgArr(0).Top = Me.ScaleHeight - 360
End Select
End Sub
Private Sub MDIForm_Unload(Cancel As Integer)
blnBoot(3) = CBool(GetSetting(App.Title, "Settings", "Form", False))
If blnBoot(3) = True Then
If Me.WindowState <> vbMinimized Then
SaveSetting App.Title, "Settings", "MainLeft", Me.Left
SaveSetting App.Title, "Settings", "MainTop", Me.Top
SaveSetting App.Title, "Settings", "MainWidth", Me.Width
SaveSetting App.Title, "Settings", "MainHeight", Me.Height
SaveSetting App.Title, "Settings", "MenuTool1", mnuTool(0).Checked
SaveSetting App.Title, "Settings", "MenuTool2", mnuTool(1).Checked
SaveSetting App.Title, "Settings", "MenuIcon", mnuIcon(0).Checked
End If
End If
Call Shutdown
End Sub
Private Sub mnuAbout_Click()
MsgBox "名称:" & vbTab & App.Title & vbTab & vbTab & vbCrLf & "版本:" & vbTab & App.Major & "." & App.Minor & vbCrLf & "作者:" & vbTab & "章强" & vbCrLf & "公司:" & vbTab & "绍兴恒美企业" & vbCrLf & "时间:" & vbTab & "2004-03-06", vbInformation
End Sub
Private Sub mnuClose_Click()
For intCount = 1 To lDocumentCount
If ActiveForm Is Nothing Then
Exit Sub
End If
Unload ActiveForm
Next
End Sub
Private Sub mnuExit_Click()
Call Shutdown
End Sub
Private Sub mnuHide_Click()
Call mnuTool_Click(0)
End Sub
Private Sub mnuHistroy_Click()
Me.Enabled = False
frmHistroy.Show
End Sub
Private Sub mnuIcon_Click(Index As Integer)
mnuIcon(0).Checked = IIf(Index = 0, True, False)
mnuIcon(1).Checked = Not mnuIcon(0).Checked
Me.Arrange Index
End Sub
Private Sub mnuLogout_Click()
If MsgBox("确认要退出当前用户吗?", vbOKCancel) = vbOK Then
blnLogout = False
Call Shutdown
Call Main
End If
End Sub
Private Sub mnuTool_Click(Index As Integer)
mnuTool(Index).Checked = Not mnuTool(Index).Checked
Select Case Index
Case 0:
tbrTool.Visible = mnuTool(1).Checked
Case 1:
staInfo.Visible = mnuTool(2).Checked
End Select
Call MDIForm_Resize
End Sub
Private Sub mnuWeb_Click()
frmTool.Show
Me.Enabled = False
End Sub
Private Sub picMenu_Paint()
On Error Resume Next
Dim X As Single
Dim Y As Single
For X = 0 To 1
For Y = 0 To picMenu.ScaleHeight \ 960
picMenu.PaintPicture picMenu.Picture, X * 960, Y * 960
Next
Next
End Sub
Private Sub tbrMenu_ButtonClick(Index As Integer, ByVal Button As MSComctlLib.Button)
Select Case Index
Case 0:
'frmPerson.Show
Case 1:
frmInfo.Show
MDIMain.Enabled = False
Case 2:
Case 3:
Case 4:
Case 5:
Case 6:
Case 7:
Case 8:
Case 9:
Case 10:
Case 11:
End Select
End Sub
Private Sub tbrTool_ButtonClick(ByVal Button As MSComctlLib.Button)
MsgBox "功能未制作!"
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -