📄 form0414.frm
字号:
VERSION 5.00
Begin VB.Form Form1
Caption = "字体"
ClientHeight = 3195
ClientLeft = 60
ClientTop = 345
ClientWidth = 4950
LinkTopic = "Form1"
ScaleHeight = 3195
ScaleWidth = 4950
StartUpPosition = 3 '窗口缺省
Begin VB.Frame Frame3
Caption = "实例"
Height = 1095
Left = 1800
TabIndex = 13
Top = 1800
Width = 1815
Begin VB.TextBox Text2
Height = 495
Left = 120
Locked = -1 'True
TabIndex = 14
Text = "中文字体AaBbXxYy"
Top = 360
Width = 1575
End
End
Begin VB.TextBox Text1
Height = 270
Left = 240
TabIndex = 12
Top = 600
Width = 1455
End
Begin VB.CommandButton Command2
Caption = "取消"
Height = 375
Left = 3840
TabIndex = 11
Top = 1080
Width = 855
End
Begin VB.CommandButton Command1
Caption = "确定"
Height = 375
Left = 3840
TabIndex = 5
Top = 480
Width = 855
End
Begin VB.ComboBox Combo1
Height = 300
ItemData = "Form0414.frx":0000
Left = 3840
List = "Form0414.frx":0013
TabIndex = 4
Text = "16"
Top = 2040
Width = 855
End
Begin VB.ListBox List1
Height = 600
ItemData = "Form0414.frx":002B
Left = 240
List = "Form0414.frx":0041
TabIndex = 3
Top = 840
Width = 1455
End
Begin VB.Frame Frame2
Caption = "字体样式"
Height = 975
Left = 1920
TabIndex = 2
Top = 480
Width = 1455
Begin VB.OptionButton Option1
Caption = "斜体"
Height = 255
Index = 1
Left = 240
TabIndex = 7
Top = 600
Width = 975
End
Begin VB.OptionButton Option1
Caption = "粗体"
Height = 255
Index = 0
Left = 240
TabIndex = 6
Top = 240
Width = 975
End
End
Begin VB.Frame Frame1
Caption = "效果"
Height = 1095
Left = 240
TabIndex = 1
Top = 1800
Width = 1455
Begin VB.CheckBox check1
Caption = "下划线"
Height = 255
Index = 1
Left = 120
TabIndex = 9
Top = 720
Width = 975
End
Begin VB.CheckBox check1
Caption = "删除线"
Height = 255
Index = 0
Left = 120
TabIndex = 8
Top = 360
Width = 1215
End
End
Begin VB.Label Label2
Caption = "字号:"
Height = 255
Left = 3840
TabIndex = 10
Top = 1800
Width = 855
End
Begin VB.Label Label1
Caption = "字体:"
Height = 255
Left = 240
TabIndex = 0
Top = 360
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 check1_Click(Index As Integer)
If Index = 0 Then
'设置字体的删除线
Text2.FontStrikethru = True
Else
'设置字体的下划线
Text2.FontUnderline = True
End If
End Sub
Private Sub Combo1_Click()
'改变字号
Text2.FontSize = Combo1.Text
End Sub
Private Sub Command1_Click()
'单击确定按钮
Unload Me
End Sub
Private Sub Command2_Click()
'单击取消按钮
Unload Me
End Sub
Private Sub List1_Click()
'在文本框显示列表框的选项
Text1.Text = List1.Text
End Sub
Private Sub Option1_Click(Index As Integer)
If Index = 0 Then
'设置字体为粗体
Text2.FontBold = True
Text2.FontItalic = False
Else
'设置字体为斜体
Text2.FontBold = False
Text2.FontItalic = True
End If
End Sub
Private Sub Text1_Change()
'改变字体
Text2.FontName = Text1.Text
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -