📄 form1.frm
字号:
VERSION 5.00
Object = "{6B7E6392-850A-101B-AFC0-4210102A8DA7}#1.2#0"; "COMCTL32.OCX"
Begin VB.Form ToolForm
Appearance = 0 'Flat
AutoRedraw = -1 'True
BackColor = &H00C0C0C0&
BorderStyle = 0 'None
ClientHeight = 735
ClientLeft = 0
ClientTop = 0
ClientWidth = 8160
ClipControls = 0 'False
ControlBox = 0 'False
LinkTopic = "Form1"
LockControls = -1 'True
MaxButton = 0 'False
MDIChild = -1 'True
MinButton = 0 'False
ScaleHeight = 735
ScaleWidth = 8160
ShowInTaskbar = 0 'False
Begin ComctlLib.Toolbar Toolbar1
Height = 630
Left = 555
TabIndex = 0
Top = 60
Width = 6975
_ExtentX = 12303
_ExtentY = 1111
ButtonWidth = 1032
ButtonHeight = 1005
ImageList = "ImageList1"
_Version = 327682
BeginProperty Buttons {0713E452-850A-101B-AFC0-4210102A8DA7}
NumButtons = 15
BeginProperty Button1 {0713F354-850A-101B-AFC0-4210102A8DA7}
Key = "New"
Object.ToolTipText = "新样品登录"
Object.Tag = ""
ImageIndex = 1
EndProperty
BeginProperty Button2 {0713F354-850A-101B-AFC0-4210102A8DA7}
Key = "Modify"
Object.ToolTipText = "修改样品"
Object.Tag = ""
ImageIndex = 2
EndProperty
BeginProperty Button3 {0713F354-850A-101B-AFC0-4210102A8DA7}
Key = "Delete"
Object.ToolTipText = "删除样品"
Object.Tag = ""
ImageIndex = 3
EndProperty
BeginProperty Button4 {0713F354-850A-101B-AFC0-4210102A8DA7}
Object.Tag = ""
Style = 3
MixedState = -1 'True
EndProperty
BeginProperty Button5 {0713F354-850A-101B-AFC0-4210102A8DA7}
Key = "Find"
Object.ToolTipText = "检索样品"
Object.Tag = ""
ImageIndex = 4
EndProperty
BeginProperty Button6 {0713F354-850A-101B-AFC0-4210102A8DA7}
Key = "View"
Object.ToolTipText = "浏览样品"
Object.Tag = ""
ImageIndex = 5
EndProperty
BeginProperty Button7 {0713F354-850A-101B-AFC0-4210102A8DA7}
Object.Tag = ""
Style = 3
MixedState = -1 'True
EndProperty
BeginProperty Button8 {0713F354-850A-101B-AFC0-4210102A8DA7}
Key = "Property"
Object.ToolTipText = "样品参数配置"
Object.Tag = ""
ImageIndex = 13
EndProperty
BeginProperty Button9 {0713F354-850A-101B-AFC0-4210102A8DA7}
Key = "Config"
Object.ToolTipText = "系统配置"
Object.Tag = ""
ImageIndex = 6
EndProperty
BeginProperty Button10 {0713F354-850A-101B-AFC0-4210102A8DA7}
Key = "User"
Object.ToolTipText = "用户配置"
Object.Tag = ""
ImageIndex = 7
EndProperty
BeginProperty Button11 {0713F354-850A-101B-AFC0-4210102A8DA7}
Object.Tag = ""
Style = 3
MixedState = -1 'True
EndProperty
BeginProperty Button12 {0713F354-850A-101B-AFC0-4210102A8DA7}
Key = "Tip"
Object.ToolTipText = "每日一贴"
Object.Tag = ""
ImageIndex = 8
EndProperty
BeginProperty Button13 {0713F354-850A-101B-AFC0-4210102A8DA7}
Key = "Help"
Object.ToolTipText = "帮助信息"
Object.Tag = ""
ImageIndex = 9
EndProperty
BeginProperty Button14 {0713F354-850A-101B-AFC0-4210102A8DA7}
Object.Tag = ""
Style = 3
MixedState = -1 'True
EndProperty
BeginProperty Button15 {0713F354-850A-101B-AFC0-4210102A8DA7}
Key = "Exit"
Object.ToolTipText = "退出系统"
Object.Tag = ""
ImageIndex = 10
EndProperty
EndProperty
End
Begin VB.Image ToolImage
Height = 780
Left = 0
Picture = "Form1.frx":0000
Top = -30
Width = 7800
End
Begin ComctlLib.ImageList ImageList1
Left = 2100
Top = 525
_ExtentX = 1005
_ExtentY = 1005
BackColor = -2147483643
ImageWidth = 32
ImageHeight = 32
MaskColor = 12632256
_Version = 327682
BeginProperty Images {0713E8C2-850A-101B-AFC0-4210102A8DA7}
NumListImages = 13
BeginProperty ListImage1 {0713E8C3-850A-101B-AFC0-4210102A8DA7}
Picture = "Form1.frx":13D24
Key = ""
EndProperty
BeginProperty ListImage2 {0713E8C3-850A-101B-AFC0-4210102A8DA7}
Picture = "Form1.frx":1403E
Key = ""
EndProperty
BeginProperty ListImage3 {0713E8C3-850A-101B-AFC0-4210102A8DA7}
Picture = "Form1.frx":14358
Key = ""
EndProperty
BeginProperty ListImage4 {0713E8C3-850A-101B-AFC0-4210102A8DA7}
Picture = "Form1.frx":14672
Key = ""
EndProperty
BeginProperty ListImage5 {0713E8C3-850A-101B-AFC0-4210102A8DA7}
Picture = "Form1.frx":1498C
Key = ""
EndProperty
BeginProperty ListImage6 {0713E8C3-850A-101B-AFC0-4210102A8DA7}
Picture = "Form1.frx":14CA6
Key = ""
EndProperty
BeginProperty ListImage7 {0713E8C3-850A-101B-AFC0-4210102A8DA7}
Picture = "Form1.frx":14FC0
Key = ""
EndProperty
BeginProperty ListImage8 {0713E8C3-850A-101B-AFC0-4210102A8DA7}
Picture = "Form1.frx":152DA
Key = ""
EndProperty
BeginProperty ListImage9 {0713E8C3-850A-101B-AFC0-4210102A8DA7}
Picture = "Form1.frx":155F4
Key = ""
EndProperty
BeginProperty ListImage10 {0713E8C3-850A-101B-AFC0-4210102A8DA7}
Picture = "Form1.frx":1590E
Key = ""
EndProperty
BeginProperty ListImage11 {0713E8C3-850A-101B-AFC0-4210102A8DA7}
Picture = "Form1.frx":15C28
Key = ""
EndProperty
BeginProperty ListImage12 {0713E8C3-850A-101B-AFC0-4210102A8DA7}
Picture = "Form1.frx":15F42
Key = ""
EndProperty
BeginProperty ListImage13 {0713E8C3-850A-101B-AFC0-4210102A8DA7}
Picture = "Form1.frx":1625C
Key = ""
EndProperty
EndProperty
End
End
Attribute VB_Name = "ToolForm"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim MD As Boolean, Oldx As Long, Oldy As Long
Private Sub Form_Load()
Dim TempX As Long, TempY As Long
TempX = GetSetting(App.EXEName, "ToolForm", "Position X")
ToolForm.Left = TempX
TempY = GetSetting(App.EXEName, "ToolForm", "Position Y")
ToolForm.Top = TempY
On Error Resume Next
ToolImage.Picture = LoadPicture(Browser + "TOOLBAR.BMP")
' Call CoolBar(Toolbar1)
ToolImage.Left = 0
ToolImage.Top = -32
End Sub
Private Sub Toolbar1_ButtonClick(ByVal Button As ComctlLib.Button)
Me.MousePointer = 11
Select Case Button.Key
Case "Property"
MDIForm1.MousePointer = 11
If frmDefine.Visible Then
MDIForm1.MousePointer = 0
frmDefine.SetFocus
Else
frmDefine.Show
End If
MDIForm1.MousePointer = 0
Case "Exit"
Me.MousePointer = 0
Unload MDIForm1
Exit Sub
Case "New"
MDIForm1.MousePointer = 11
If frmRegister.Visible = True Then
MDIForm1.MousePointer = 0
frmRegister.SetFocus
Else
frmRegister.Show
End If
MDIForm1.MousePointer = 0
Case "Modify"
MDIForm1.MousePointer = 11
If frmModify.Visible = True Then
MDIForm1.MousePointer = 0
frmModify.SetFocus
Else
frmModify.Show
End If
MDIForm1.MousePointer = 0
Case "Delete"
MDIForm1.MousePointer = 11
If frmDelete.Visible = True Then
MDIForm1.MousePointer = 0
frmDelete.SetFocus
Else
frmDelete.Show
End If
MDIForm1.MousePointer = 0
Case "Config"
MDIForm1.MousePointer = 11
If ConfigForm.Visible = True Then
MDIForm1.MousePointer = 0
ConfigForm.SetFocus
Else
ConfigForm.Show
End If
MDIForm1.MousePointer = 0
Case "User"
MDIForm1.MousePointer = 11
If Operationer.Visible = True Then
MDIForm1.MousePointer = 0
Operationer.SetFocus
Else
Operationer.Show
End If
MDIForm1.MousePointer = 0
Case "Tip"
MDIForm1.MousePointer = 11
If frmTip.Visible = True Then
MDIForm1.MousePointer = 0
frmTip.SetFocus
Else
frmTip.Show
End If
MDIForm1.MousePointer = 0
Case "Find"
MDIForm1.MousePointer = 11
If frmExplorer.Visible = True Then
MDIForm1.MousePointer = 0
frmExplorer.SetFocus
Else
frmExplorer.Show
End If
MDIForm1.MousePointer = 0
Case "View"
MDIForm1.MousePointer = 11
Load frmView
MDIForm1.MousePointer = 0
MDIForm1.Hide
frmView.Show 1
Case "Help"
MDIForm1.MousePointer = 11
MDIForm1.HelpDailog.HelpFile = Browser + "Help.HLP"
MDIForm1.HelpDailog.HelpCommand = &H9&
MDIForm1.HelpDailog.ShowHelp
MDIForm1.MousePointer = 0
End Select
Me.MousePointer = 0
End Sub
Private Sub ToolImage_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
MD = True
Oldx = X: Oldy = Y
End Sub
Private Sub ToolImage_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
If MD = True Then
If ToolForm.Left + X - Oldx <= 0 Or ToolForm.Left + X - Oldx + ToolForm.Width >= MDIForm1.ScaleWidth Then
If ToolForm.Left + X - Oldx <= 0 Then
ToolForm.Left = 0
Else
ToolForm.Left = MDIForm1.ScaleWidth - ToolForm.Width
End If
Else
ToolForm.Left = ToolForm.Left + X - Oldx
End If
If ToolForm.Top + Y - Oldy <= 0 Or ToolForm.Top + Y - Oldy + ToolForm.Height >= MDIForm1.ScaleHeight Then
If ToolForm.Top + Y - Oldy <= 0 Then
ToolForm.Top = 0
Else
ToolForm.Top = MDIForm1.ScaleHeight - ToolForm.Height
End If
Else
ToolForm.Top = ToolForm.Top + Y - Oldy
End If
End If
End Sub
Private Sub ToolImage_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
MD = False
SaveSetting App.EXEName, "ToolForm", "Position X", ToolForm.Left
SaveSetting App.EXEName, "ToolForm", "Position Y", ToolForm.Top
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -