📄 菜单的应用.frm
字号:
VERSION 5.00
Begin VB.Form Form1
Caption = "Form1"
ClientHeight = 2820
ClientLeft = 165
ClientTop = 735
ClientWidth = 5190
LinkTopic = "Form1"
ScaleHeight = 2820
ScaleWidth = 5190
StartUpPosition = 3 '窗口缺省
Begin VB.TextBox Text1
Height = 2775
Left = 0
TabIndex = 0
Top = 0
Width = 5175
End
Begin VB.Menu File
Caption = "文件(&F)"
Begin VB.Menu New
Caption = "新建(&N) Ctrl+N"
End
Begin VB.Menu Open
Caption = "打开(&O)... Ctrl+O"
End
Begin VB.Menu row1
Caption = "-"
End
Begin VB.Menu Close
Caption = "关闭(&C)"
End
End
Begin VB.Menu Edit
Caption = "编辑(&E)"
Begin VB.Menu Trim
Caption = "剪切(&T)"
End
Begin VB.Menu Copy
Caption = "复制(&C)"
End
Begin VB.Menu Paste
Caption = "粘贴(&P)"
End
Begin VB.Menu row2
Caption = "-"
End
Begin VB.Menu Allselect
Caption = "全选(&A)"
End
End
Begin VB.Menu Color
Caption = "颜色(&C)"
Begin VB.Menu Red
Caption = "红(&R)"
End
Begin VB.Menu Blue
Caption = "蓝(&B)"
End
Begin VB.Menu Green
Caption = "绿(&G)"
End
Begin VB.Menu row3
Caption = "-"
End
Begin VB.Menu SelfColor
Caption = "自定义颜色(&S)..."
End
End
Begin VB.Menu Tool
Caption = "工具(&T)"
Begin VB.Menu Ping
Caption = "拼写和语法(&Y)"
End
Begin VB.Menu Word
Caption = "字数统计(&W)..."
End
Begin VB.Menu row4
Caption = "-"
End
Begin VB.Menu Fform
Caption = "插入表格(&F)"
End
Begin VB.Menu Picture
Caption = "插入图片(&P)"
End
Begin VB.Menu row5
Caption = "-"
End
Begin VB.Menu Option
Caption = "选项(&O)..."
End
End
Begin VB.Menu Help
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 Blue_Click()
If Len(Text1.Text) <> 0 Then
Text1.ForeColor = vbBlue
End If
End Sub
Private Sub Green_Click()
If Len(Text1.Text) <> 0 Then
Text1.ForeColor = vbGreen
End If
End Sub
Private Sub Close_Click()
End
End Sub
Private Sub Form_Load()
Paste.Enabled = False
End Sub
Private Sub Paste_Click()
If Len(Clipboard.GetText) >= 0 Then
Paste.Enabled = True
Else
Paste.Enabled = False
End If
End Sub
Private Sub Picture1_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = 2 Then
PopupMenu PictureEdit
End If
End Sub
Private Sub Ppaste_Click()
If Len(Clipboard.GetText) >= 0 Then
Ppaste.Enabled = True
Else
Ppaste.Enabled = False
End If
End Sub
End Sub
Private Sub Red_Click()
If Len(Text1.Text) <> 0 Then
Text1.ForeColor = vbRed
End If
End Sub
Private Sub SelfColor_Click()
CommonDialog1.ShowColor
End Sub
Private Sub Trim_Click()
If Trim.Checked = False Then
Trim.Checked = True
Else
Trim.Checked = False
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -