📄 form1.frm
字号:
VERSION 5.00
Begin VB.Form Form1
Caption = "一个简单的文本编辑器"
ClientHeight = 4305
ClientLeft = 165
ClientTop = 735
ClientWidth = 6510
LinkTopic = "Form1"
ScaleHeight = 4305
ScaleWidth = 6510
StartUpPosition = 3 '窗口缺省
Begin VB.TextBox Text1
Height = 3255
Left = 240
MultiLine = -1 'True
ScrollBars = 3 'Both
TabIndex = 0
Top = 480
Width = 5775
End
Begin VB.Menu mnuFile
Caption = "文件(F)"
End
Begin VB.Menu mnuEdit
Caption = "编辑(E)"
Begin VB.Menu EditCut
Caption = "剪切"
End
Begin VB.Menu EditCopy
Caption = "复制"
End
Begin VB.Menu EditPaste
Caption = "粘贴"
End
End
Begin VB.Menu mnuSet
Caption = "设置(S)"
Begin VB.Menu SetFont
Caption = "设置字体"
Begin VB.Menu SetFont_S
Caption = "宋体"
End
Begin VB.Menu SetFont_H
Caption = "黑体"
End
Begin VB.Menu SetFont_L
Caption = "隶书"
End
Begin VB.Menu SetFont_K
Caption = "楷书"
End
End
Begin VB.Menu setColor
Caption = "设置颜色"
Begin VB.Menu setColor_Color
Caption = "红色"
Index = 1
End
Begin VB.Menu setColor_Color
Caption = "绿色"
Index = 2
End
Begin VB.Menu setColor_Color
Caption = "蓝色"
Index = 3
End
End
End
Begin VB.Menu mnuHelp
Caption = "帮助(H)"
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub setColor_Color_Click(Index As Integer)
Dim i As Integer
For i = 1 To 3
setColor_Color(i).Checked = False
Next i
setColor_Color(Index).Checked = True
Select Case Index
Case 1
Text1.ForeColor = RGB(255, 0, 0) '将文本框中的字体颜色设置为红色
Case 2
Text1.ForeColor = RGB(0, 255, 0) '将文本框中的字体颜色设置为蓝色
Case 3
Text1.ForeColor = RGB(0, 0, 255) '将文本框中的字体颜色设置为绿色
End Select
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -