📄 例[14-2].frm
字号:
VERSION 5.00
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCTL.OCX"
Begin VB.Form Form1
Caption = "例[14-2] 状态栏"
ClientHeight = 3195
ClientLeft = 60
ClientTop = 345
ClientWidth = 3630
LinkTopic = "Form1"
ScaleHeight = 3195
ScaleWidth = 3630
StartUpPosition = 3 '窗口缺省
Begin MSComctlLib.StatusBar StatusBar1
Align = 2 'Align Bottom
Height = 375
Left = 0
TabIndex = 2
Top = 2820
Width = 3630
_ExtentX = 6403
_ExtentY = 661
_Version = 393216
BeginProperty Panels {8E3867A5-8586-11D1-B16A-00C0F0283628}
NumPanels = 3
BeginProperty Panel1 {8E3867AB-8586-11D1-B16A-00C0F0283628}
Object.Width = 1764
MinWidth = 1764
Text = "字体状态"
TextSave = "字体状态"
EndProperty
BeginProperty Panel2 {8E3867AB-8586-11D1-B16A-00C0F0283628}
Object.Width = 1764
MinWidth = 1764
EndProperty
BeginProperty Panel3 {8E3867AB-8586-11D1-B16A-00C0F0283628}
Style = 5
Picture = "例[14-2].frx":0000
TextSave = "10:26"
EndProperty
EndProperty
End
Begin MSComctlLib.Toolbar Toolbar1
Align = 1 'Align Top
Height = 420
Left = 0
TabIndex = 1
Top = 0
Width = 3630
_ExtentX = 6403
_ExtentY = 741
ButtonWidth = 609
Appearance = 1
ImageList = "ImageList1"
_Version = 393216
BeginProperty Buttons {66833FE8-8583-11D1-B16A-00C0F0283628}
NumButtons = 3
BeginProperty Button1 {66833FEA-8583-11D1-B16A-00C0F0283628}
Key = "Bold"
ImageIndex = 1
Style = 1
EndProperty
BeginProperty Button2 {66833FEA-8583-11D1-B16A-00C0F0283628}
Key = "Italic"
ImageIndex = 2
Style = 1
EndProperty
BeginProperty Button3 {66833FEA-8583-11D1-B16A-00C0F0283628}
Key = "Underline"
ImageIndex = 3
Style = 1
EndProperty
EndProperty
Begin MSComctlLib.ImageList ImageList1
Left = 3000
Top = 480
_ExtentX = 1005
_ExtentY = 1005
BackColor = -2147483643
ImageWidth = 16
ImageHeight = 16
MaskColor = 12632256
_Version = 393216
BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628}
NumListImages = 3
BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "例[14-2].frx":019A
Key = ""
EndProperty
BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "例[14-2].frx":02AC
Key = ""
EndProperty
BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "例[14-2].frx":03BE
Key = ""
EndProperty
EndProperty
End
End
Begin VB.TextBox Text1
Height = 1815
Left = 240
TabIndex = 0
Text = "红豆生南国,春来发几枝"
Top = 840
Width = 3135
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Toolbar1_ButtonClick(ByVal Button As MSComctlLib.Button)
Dim n As Integer
n = Button.Index
Select Case n
Case 1
Text1.FontBold = Button.Value 'button.value值为0表示不是黑体,值为1(按下时)则相反
Case 2
Text1.FontItalic = Button.Value
Case 3
Text1.FontUnderline = Button.Value
End Select
If Text1.FontBold = True Then s = s + "B "
If Text1.FontItalic = True Then s = s + "I "
If Text1.FontUnderline = True Then s = s + "U"
StatusBar1.Panels(2).Text = s
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -