📄 mdiform1.frm
字号:
VERSION 5.00
Begin VB.MDIForm MDIForm1
BackColor = &H8000000C&
Caption = "多文档记事本"
ClientHeight = 4860
ClientLeft = 165
ClientTop = 735
ClientWidth = 6090
LinkTopic = "MDIForm1"
StartUpPosition = 3 '窗口缺省
Begin VB.Menu file
Caption = "文件"
Begin VB.Menu new
Caption = "新建"
End
Begin VB.Menu exit
Caption = "退出"
End
End
Begin VB.Menu edit
Caption = "编辑"
Begin VB.Menu cut
Caption = "剪切"
End
Begin VB.Menu del
Caption = "删除"
End
Begin VB.Menu sel
Caption = "全选"
End
Begin VB.Menu paste
Caption = "粘贴"
End
End
End
Attribute VB_Name = "MDIForm1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub loadnewdoc()
Static ldocumentcount As Long
Dim frmd As Mydocument
ldocumentcount = ldocumentcount + 1
Set frmd = New Mydocument
frmd.Caption = "文档" & ldocumentcount
frmd.Show
End Sub
Private Sub cut_Click()
Clipboard.SetText MDIForm1.ActiveForm.ActiveControl.SelText
MDIForm1.ActiveForm.ActiveControl.SelText = ""
End Sub
Private Sub del_Click()
MDIForm1.ActiveForm.ActiveControl.SelText = ""
End Sub
Private Sub exit_Click()
Unload MDIForm1
End
End Sub
Private Sub new_Click()
loadnewdoc
End Sub
Private Sub paste_Click()
MDIForm1.ActiveForm.ActiveControl.SelText = Clipboard.GetText()
End Sub
Private Sub sel_Click()
MDIForm1.ActiveForm.ActiveControl.SelStart = 0
MDIForm1.ActiveForm.ActiveControl.SelLength = Len(MDIForm1.ActiveForm.ActiveControl.Text)
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -