📄 例6.7.frm
字号:
VERSION 5.00
Begin VB.Form Form1
Caption = "控件数组的使用"
ClientHeight = 2925
ClientLeft = 60
ClientTop = 345
ClientWidth = 4800
LinkTopic = "Form1"
ScaleHeight = 2925
ScaleWidth = 4800
StartUpPosition = 3 '窗口缺省
Begin VB.OptionButton Option1
Caption = "28"
Height = 180
Index = 2
Left = 1680
TabIndex = 4
Top = 2400
Width = 495
End
Begin VB.OptionButton Option1
Caption = "20"
Height = 180
Index = 1
Left = 1680
TabIndex = 3
Top = 1920
Width = 615
End
Begin VB.OptionButton Option1
Caption = "12"
Height = 180
Index = 0
Left = 1680
TabIndex = 2
Top = 1440
Width = 735
End
Begin VB.TextBox Text1
Height = 735
Left = 360
TabIndex = 0
Text = "控件数组的使用"
Top = 120
Width = 4065
End
Begin VB.Label Label1
Caption = "字号控制"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 1440
TabIndex = 1
Top = 1080
Width = 1095
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Form_Load()
Option1(0).Value = True '选定第一个单选按钮
Text1.FontSize = 12 '设定文本框中的字号
End Sub
Private Sub Option1_Click(Index As Integer)
Select Case Index '系统自动返回Index值
Case 0
Text1.FontSize = 12
Case 1
Text1.FontSize = 20
Case 2
Text1.FontSize = 28
End Select
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -