📄 文本编辑.frm
字号:
VERSION 5.00
Begin VB.Form Form1
Caption = "Form1"
ClientHeight = 7260
ClientLeft = 60
ClientTop = 450
ClientWidth = 5265
LinkTopic = "Form1"
ScaleHeight = 7260
ScaleWidth = 5265
StartUpPosition = 3 '窗口缺省
Begin VB.Frame Frame3
Caption = "Frame3"
Height = 975
Index = 0
Left = 120
TabIndex = 8
Top = 5760
Width = 1935
Begin VB.OptionButton Option2
Caption = "16"
Height = 255
Index = 2
Left = 1440
TabIndex = 11
Top = 480
Width = 615
End
Begin VB.OptionButton Option2
Caption = "12"
Height = 255
Index = 1
Left = 840
TabIndex = 10
Top = 480
Width = 615
End
Begin VB.OptionButton Option2
Caption = "10"
Height = 255
Index = 0
Left = 120
TabIndex = 9
Top = 480
Width = 615
End
End
Begin VB.Frame Frame2
Caption = "Frame2"
Height = 1455
Left = 3840
TabIndex = 4
Top = 5880
Width = 1215
Begin VB.OptionButton Option1
Caption = "居中"
Height = 255
Index = 2
Left = 120
TabIndex = 7
Top = 960
Width = 855
End
Begin VB.OptionButton Option1
Caption = "右"
Height = 255
Index = 1
Left = 120
TabIndex = 6
Top = 600
Width = 975
End
Begin VB.OptionButton Option1
Caption = "左"
Height = 255
Index = 0
Left = 120
TabIndex = 5
Top = 240
Width = 975
End
End
Begin VB.Frame Frame1
Caption = "字体样式"
Height = 975
Left = 2160
TabIndex = 1
Top = 5880
Width = 1695
Begin VB.CheckBox Check1
Caption = "斜体"
Height = 375
Index = 1
Left = 960
TabIndex = 3
Top = 360
Width = 855
End
Begin VB.CheckBox Check1
Caption = "粗体"
Height = 375
Index = 0
Left = 120
TabIndex = 2
Top = 360
Width = 855
End
End
Begin VB.TextBox Text1
Height = 5535
Left = 600
MultiLine = -1 'True
TabIndex = 0
Text = "文本编辑.frx":0000
Top = 240
Width = 3975
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 Check1(Index).Value = 1 Then
Select Case Index
Case 0
Text1.FontBold = True
Case 1
Text1.FontItalic = True
End Select
End If
If Check1(Index).Value = 0 Then
Select Case Index
Case 0
Text1.FontBold = False
Case 1
Text1.FontItalic = False
End Select
End If
End Sub
Private Sub Form_Load()
Option1(0).Value = True
Text1.Alignment = 0
Option2(0).Value = True
Text1.FontSize = 10
Check1(0).Value = 0
Text1.FontBold = False
Check1(1).Value = 0
Text1.FontItalic = False
End Sub
Private Sub Option1_Click(Index As Integer)
Select Case Index
Case 0
Text1.Alignment = 0
Case 1
Text1.Alignment = 1
Case 2
Text1.Alignment = 2
End Select
End Sub
Private Sub Option2_Click(Index As Integer)
Select Case Index
Case 0
Text1.FontSize = 10
Case 1
Text1.FontSize = 12
Case 2
Text1.FontSize = 16
End Select
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -