📄 practice10-2.frm
字号:
VERSION 5.00
Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0"; "Comdlg32.ocx"
Begin VB.Form form1
Caption = "Form1"
ClientHeight = 2055
ClientLeft = 5940
ClientTop = 4590
ClientWidth = 3225
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
LinkTopic = "Form1"
ScaleHeight = 2055
ScaleWidth = 3225
Begin VB.PictureBox Picture1
Align = 1 'Align Top
Height = 495
Left = 0
ScaleHeight = 435
ScaleWidth = 3165
TabIndex = 1
Top = 0
Width = 3225
Begin VB.CheckBox Check4
Caption = "U"
Height = 495
Left = 1440
Style = 1 'Graphical
TabIndex = 5
ToolTipText = "下划线"
Top = 0
Width = 495
End
Begin VB.CheckBox Check3
Caption = "S"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = -1 'True
EndProperty
Height = 495
Left = 960
Style = 1 'Graphical
TabIndex = 4
ToolTipText = "删除线"
Top = 0
Width = 495
End
Begin VB.CheckBox Check2
Caption = "B"
Height = 495
Left = 480
Style = 1 'Graphical
TabIndex = 3
ToolTipText = "粗体"
Top = 0
Width = 495
End
Begin VB.CheckBox Check1
Caption = "I"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = -1 'True
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 0
Style = 1 'Graphical
TabIndex = 2
ToolTipText = "斜体"
Top = 0
Width = 495
End
End
Begin MSComDlg.CommonDialog CommonDialog1
Left = 2400
Top = 1560
_ExtentX = 847
_ExtentY = 847
_Version = 393216
End
Begin VB.TextBox Text1
BeginProperty Font
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 1335
Left = 120
MultiLine = -1 'True
ScrollBars = 2 'Vertical
TabIndex = 0
Text = "practice10-2.frx":0000
Top = 720
Width = 3015
End
Begin VB.Menu AA
Caption = "字体(&F)"
Begin VB.Menu AA1
Caption = "宋体"
Index = 1
Shortcut = ^S
End
Begin VB.Menu AA1
Caption = "黑体"
Index = 2
Shortcut = ^H
End
Begin VB.Menu AA1
Caption = "-"
Index = 3
End
Begin VB.Menu AA1
Caption = "隶书"
Index = 4
Shortcut = ^L
End
Begin VB.Menu AA1
Caption = "幼圆"
Index = 5
Shortcut = ^Y
End
End
Begin VB.Menu CC
Caption = "颜色(&C)"
Begin VB.Menu CC1
Caption = "文字颜色"
End
Begin VB.Menu CC2
Caption = "背景颜色"
End
End
Begin VB.Menu DD
Caption = "属性(&A)"
Begin VB.Menu DD1
Caption = "只读"
End
Begin VB.Menu DD2
Caption = "隐藏"
End
End
End
Attribute VB_Name = "form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub AA1_Click(Index As Integer)
Text1.Font = AA1(Index).Caption
End Sub
Private Sub BB1_Click(Index As Integer)
Text1.FontSize = Val(BB1(Index).Caption)
End Sub
Private Sub CC1_Click()
CommonDialog1.ShowColor
Text1.ForeColor = CommonDialog1.Color
End Sub
Private Sub CC2_Click()
CommonDialog1.ShowColor
Text1.BackColor = CommonDialog1.Color
End Sub
Private Sub Check1_Click()
Text1.FontItalic = Check1.Value
End Sub
Private Sub Check2_Click()
Text1.FontBold = Check2.Value
End Sub
Private Sub Check3_Click()
Text1.FontStrikethru = Check3.Value
End Sub
Private Sub Check4_Click()
Text1.FontUnderline = Check4.Value
End Sub
Private Sub DD1_Click()
If DD1.Checked = True Then
Text1.Locked = False
DD1.Checked = False
Else
Text1.Locked = True
DD1.Checked = True
End If
End Sub
Private Sub DD2_Click()
If DD2.Caption = "隐藏" Then
Text1.Visible = False
DD2.Caption = "显示"
Else
Text1.Visible = True
DD2.Caption = "隐藏"
End If
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -