📄 form1.frm
字号:
VERSION 5.00
Begin VB.Form Form1
Caption = "Form1"
ClientHeight = 4170
ClientLeft = 60
ClientTop = 345
ClientWidth = 4380
LinkTopic = "Form1"
ScaleHeight = 4170
ScaleWidth = 4380
StartUpPosition = 2 '屏幕中心
Begin VB.CommandButton Command2
Caption = "退出"
Height = 375
Left = 2640
TabIndex = 5
Top = 3720
Width = 975
End
Begin VB.CommandButton Command1
Caption = "清除"
Height = 375
Left = 840
TabIndex = 4
Top = 3720
Width = 1000
End
Begin VB.Frame Frame3
Caption = "字形"
Height = 2295
Left = 3000
TabIndex = 3
Top = 1200
Width = 1300
Begin VB.CheckBox Check3
Caption = "下划线"
Height = 375
Left = 240
TabIndex = 14
Top = 1560
Width = 975
End
Begin VB.CheckBox Check2
Caption = "斜体"
Height = 375
Left = 240
TabIndex = 13
Top = 960
Width = 855
End
Begin VB.CheckBox Check1
Caption = "粗体"
Height = 495
Left = 240
TabIndex = 12
Top = 360
Width = 855
End
End
Begin VB.Frame Frame2
Caption = "颜色"
Height = 2295
Left = 1560
TabIndex = 2
Top = 1200
Width = 1300
Begin VB.OptionButton Option6
Caption = "黄色"
Height = 375
Left = 240
TabIndex = 11
Top = 1560
Width = 735
End
Begin VB.OptionButton Option5
Caption = "绿色"
Height = 495
Left = 240
TabIndex = 10
Top = 960
Width = 975
End
Begin VB.OptionButton Option4
Caption = "红色"
Height = 375
Left = 240
TabIndex = 9
Top = 480
Width = 975
End
End
Begin VB.Frame Frame1
Caption = "字体"
Height = 2295
Left = 120
TabIndex = 1
Top = 1200
Width = 1300
Begin VB.OptionButton Option3
Caption = "幼圆"
Height = 255
Left = 240
TabIndex = 8
Top = 1560
Width = 855
End
Begin VB.OptionButton Option2
Caption = "黑体"
Height = 255
Left = 240
TabIndex = 7
Top = 1080
Width = 975
End
Begin VB.OptionButton Option1
Caption = "宋体"
Height = 255
Left = 240
TabIndex = 6
Top = 600
Width = 975
End
End
Begin VB.TextBox Text1
BeginProperty Font
Name = "宋体"
Size = 15
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 855
Left = 120
MultiLine = -1 'True
ScrollBars = 2 'Vertical
TabIndex = 0
Top = 120
Width = 4215
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Check1_Click()
If Check1.Value = 1 Then
Text1.FontBold = True
Else
Text1.FontBold = False
End If
End Sub
Private Sub Check2_Click()
If Check2.Value = 1 Then Text1.FontItalic = True Else Text1.FontItalic = False
End Sub
Private Sub Check3_Click()
If Check3.Value = 1 Then Text1.FontUnderline = True Else Text1.FontUnderline = False
End Sub
Private Sub Command1_Click()
Text1.Text = ""
End Sub
Private Sub Command2_Click()
Unload Me
End
End Sub
Private Sub Option1_Click()
If Option1.Value Then Text1.FontName = Option1.Caption
End Sub
Private Sub Option2_Click()
If Option2.Value Then Text1.FontName = Option2.Caption
End Sub
Private Sub Option3_Click()
If Option3.Value Then Text1.FontName = Option3.Caption
End Sub
Private Sub Option4_Click()
If Option4.Value Then Text1.ForeColor = vbRed
End Sub
Private Sub Option5_Click()
If Option5.Value Then Text1.ForeColor = vbGreen
End Sub
Private Sub Option6_Click()
If Option6.Value Then Text1.ForeColor = vbYellow
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -