📄 practice10-3.frm
字号:
VERSION 5.00
Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0"; "Comdlg32.ocx"
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "mscomctl.ocx"
Begin VB.Form form1
Caption = "Form1"
ClientHeight = 2190
ClientLeft = 5940
ClientTop = 4590
ClientWidth = 3075
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
LinkTopic = "Form1"
ScaleHeight = 2190
ScaleWidth = 3075
Begin MSComctlLib.StatusBar StatusBar1
Align = 2 'Align Bottom
Height = 390
Left = 0
TabIndex = 6
Top = 1800
Width = 3075
_ExtentX = 5424
_ExtentY = 688
_Version = 393216
BeginProperty Panels {8E3867A5-8586-11D1-B16A-00C0F0283628}
NumPanels = 4
BeginProperty Panel1 {8E3867AB-8586-11D1-B16A-00C0F0283628}
Object.Width = 1058
MinWidth = 1058
Text = "读写"
TextSave = "读写"
EndProperty
BeginProperty Panel2 {8E3867AB-8586-11D1-B16A-00C0F0283628}
Style = 1
AutoSize = 1
Enabled = 0 'False
Object.Width = 1235
MinWidth = 1235
TextSave = "CAPS"
EndProperty
BeginProperty Panel3 {8E3867AB-8586-11D1-B16A-00C0F0283628}
Style = 5
AutoSize = 1
Object.Width = 1235
MinWidth = 1235
TextSave = "16:49"
EndProperty
BeginProperty Panel4 {8E3867AB-8586-11D1-B16A-00C0F0283628}
AutoSize = 1
Picture = "practice10-3.frx":0000
EndProperty
EndProperty
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9.75
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
End
Begin VB.PictureBox Picture1
Align = 1 'Align Top
Height = 410
Left = 0
ScaleHeight = 345
ScaleWidth = 3015
TabIndex = 1
Top = 0
Width = 3075
Begin VB.CheckBox Check4
Caption = "U"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 400
Left = 1080
Style = 1 'Graphical
TabIndex = 5
Top = 0
Width = 375
End
Begin VB.CheckBox Check3
Caption = "S"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = -1 'True
EndProperty
Height = 400
Left = 720
Style = 1 'Graphical
TabIndex = 4
Top = 0
Width = 375
End
Begin VB.CheckBox Check2
Caption = "B"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 400
Left = 360
Style = 1 'Graphical
TabIndex = 3
Top = 0
Width = 375
End
Begin VB.CheckBox Check1
Caption = "I"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 700
Underline = 0 'False
Italic = -1 'True
Strikethrough = 0 'False
EndProperty
Height = 400
Left = 0
Style = 1 'Graphical
TabIndex = 2
Top = 0
Width = 375
End
End
Begin MSComDlg.CommonDialog CommonDialog1
Left = 2400
Top = 1200
_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 = 1215
Left = 120
MultiLine = -1 'True
TabIndex = 0
Text = "practice10-3.frx":01A8
Top = 480
Width = 2775
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 = 4
Shortcut = ^L
End
Begin VB.Menu AA1
Caption = "幼圆"
Index = 5
Shortcut = ^D
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 = "属性(&P)"
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
Dim Fcolor As Long
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
StatusBar1.Panels(1).Text = "读写"
Else
Text1.Locked = True
DD1.Checked = True
StatusBar1.Panels(1).Text = "只读"
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 + -