📄 例[6-12].frm
字号:
VERSION 5.00
Begin VB.Form Form1
Caption = "例[6-12] 框架的应用 "
ClientHeight = 2445
ClientLeft = 60
ClientTop = 345
ClientWidth = 3495
LinkTopic = "Form1"
ScaleHeight = 2445
ScaleWidth = 3495
StartUpPosition = 3 '窗口缺省
Begin VB.Frame Frame2
Caption = "颜色"
Height = 1215
Left = 1920
TabIndex = 5
Top = 960
Width = 1455
Begin VB.OptionButton Option3
Caption = "红色"
Height = 375
Left = 120
TabIndex = 7
Top = 240
Width = 1095
End
Begin VB.OptionButton Option4
Caption = "绿色"
Height = 375
Left = 120
TabIndex = 6
Top = 600
Width = 975
End
End
Begin VB.Frame Frame1
Caption = "字体"
Height = 1215
Left = 240
TabIndex = 2
Top = 960
Width = 1455
Begin VB.OptionButton Option1
Caption = "宋体"
Height = 375
Left = 120
TabIndex = 4
Top = 240
Width = 1215
End
Begin VB.OptionButton Option2
Caption = "黑体"
Height = 375
Left = 120
TabIndex = 3
Top = 600
Width = 1095
End
End
Begin VB.CommandButton Command1
Caption = "确定"
Height = 375
Left = 2640
TabIndex = 1
Top = 120
Width = 735
End
Begin VB.TextBox Text1
Height = 495
Left = 240
TabIndex = 0
Top = 120
Width = 1695
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()
If Option1.Value = True And Option3.Value = True Then
Text1.Text = "您选择了宋体红色"
Text1.FontName = "宋体"
Text1.ForeColor = vbRed
End If
If Option1.Value = True And Option4.Value = True Then
Text1.Text = "您选择了宋体绿色"
Text1.FontName = "宋体"
Text1.ForeColor = vbGreen
End If
If Option2.Value = True And Option3.Value = True Then
Text1.Text = "您选择了黑体红色"
Text1.FontName = "黑体"
Text1.ForeColor = vbRed
End If
If Option2.Value = True And Option4.Value = True Then
Text1.Text = "您选择了黑体绿色"
Text1.FontName = "黑体"
Text1.ForeColor = vbGreen
End If
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -