📄 form1.frm
字号:
VERSION 5.00
Object = "{6B7E6392-850A-101B-AFC0-4210102A8DA7}#1.3#0"; "COMCTL32.OCX"
Begin VB.Form Form1
Caption = "工具栏控件"
ClientHeight = 3750
ClientLeft = 60
ClientTop = 345
ClientWidth = 4980
LinkTopic = "Form1"
ScaleHeight = 3750
ScaleWidth = 4980
StartUpPosition = 3 '窗口缺省
Begin ComctlLib.Toolbar Toolbar1
Align = 1 'Align Top
Height = 855
Left = 0
TabIndex = 0
Top = 0
Width = 4980
_ExtentX = 8784
_ExtentY = 1508
ButtonWidth = 1032
ButtonHeight = 1349
Appearance = 1
ImageList = "ilExplore"
_Version = 327682
BeginProperty Buttons {0713E452-850A-101B-AFC0-4210102A8DA7}
NumButtons = 4
BeginProperty Button1 {0713F354-850A-101B-AFC0-4210102A8DA7}
Caption = "open"
Object.Tag = ""
ImageIndex = 1
EndProperty
BeginProperty Button2 {0713F354-850A-101B-AFC0-4210102A8DA7}
Caption = "save"
Object.ToolTipText = "save"
Object.Tag = ""
ImageIndex = 2
EndProperty
BeginProperty Button3 {0713F354-850A-101B-AFC0-4210102A8DA7}
Object.Tag = ""
ImageIndex = 3
EndProperty
BeginProperty Button4 {0713F354-850A-101B-AFC0-4210102A8DA7}
Object.Tag = ""
ImageIndex = 4
EndProperty
EndProperty
End
Begin VB.CommandButton Command2
Caption = "将控件Toolbar设为风格2"
Height = 615
Left = 120
TabIndex = 2
Top = 2640
Width = 2895
End
Begin VB.CommandButton Command1
Caption = "将控件Toolbar设为风格1"
Height = 615
Left = 120
TabIndex = 1
Top = 1800
Width = 2895
End
Begin ComctlLib.ImageList ilExplore
Left = 120
Top = 1080
_ExtentX = 1005
_ExtentY = 1005
BackColor = -2147483643
ImageWidth = 32
ImageHeight = 32
MaskColor = 16711935
_Version = 327682
BeginProperty Images {0713E8C2-850A-101B-AFC0-4210102A8DA7}
NumListImages = 7
BeginProperty ListImage1 {0713E8C3-850A-101B-AFC0-4210102A8DA7}
Picture = "Form1.frx":0000
Key = ""
EndProperty
BeginProperty ListImage2 {0713E8C3-850A-101B-AFC0-4210102A8DA7}
Picture = "Form1.frx":031A
Key = ""
EndProperty
BeginProperty ListImage3 {0713E8C3-850A-101B-AFC0-4210102A8DA7}
Picture = "Form1.frx":0634
Key = ""
EndProperty
BeginProperty ListImage4 {0713E8C3-850A-101B-AFC0-4210102A8DA7}
Picture = "Form1.frx":094E
Key = ""
EndProperty
BeginProperty ListImage5 {0713E8C3-850A-101B-AFC0-4210102A8DA7}
Picture = "Form1.frx":0C68
Key = ""
EndProperty
BeginProperty ListImage6 {0713E8C3-850A-101B-AFC0-4210102A8DA7}
Picture = "Form1.frx":0F82
Key = ""
EndProperty
BeginProperty ListImage7 {0713E8C3-850A-101B-AFC0-4210102A8DA7}
Picture = "Form1.frx":129C
Key = ""
EndProperty
EndProperty
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
Call ToolbarStyle(Me.Toolbar1, 1)
End Sub
Private Sub Command2_Click()
Call ToolbarStyle(Me.Toolbar1, 2)
End Sub
Private Sub Toolbar1_ButtonClick(ByVal Button As ComctlLib.Button)
Select Case Button.Index
Case 1
MsgBox "你按了第一个按钮"
Case 2
MsgBox "你按了第二个按钮"
Case 3
MsgBox "你按了第三个按钮"
Case 4
MsgBox "你按了第四个按钮"
End Select
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -