📄 form1.frm
字号:
VERSION 5.00
Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0"; "Comdlg32.ocx"
Begin VB.Form Form1
Caption = "记事本"
ClientHeight = 4485
ClientLeft = 60
ClientTop = 345
ClientWidth = 5085
LinkTopic = "Form1"
ScaleHeight = 4485
ScaleWidth = 5085
StartUpPosition = 3 '窗口缺省
Begin VB.TextBox Text1
Height = 3255
Left = 360
MultiLine = -1 'True
ScrollBars = 3 'Both
TabIndex = 2
Text = "Form1.frx":0000
Top = 840
Width = 4215
End
Begin VB.CommandButton Command2
Caption = "文件另存为"
Height = 375
Left = 3000
TabIndex = 1
Top = 120
Width = 1455
End
Begin VB.CommandButton Command1
Caption = "打开文件"
Height = 375
Left = 360
TabIndex = 0
Top = 120
Width = 1455
End
Begin MSComDlg.CommonDialog CommonDialog1
Left = 2160
Top = 120
_ExtentX = 847
_ExtentY = 847
_Version = 393216
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
CommonDialog1.Filter = "文档文件(*.txt)|*.txt|所有文件(*.*)|*.*"
CommonDialog1.ShowOpen
If CommonDialog1.FileName = "" Then
Exit Sub
End If
Open CommonDialog1.FileName For Input As #1
Text1.Text = StrConv(InputB$(LOF(1), 1), vbUnicode)
Close #1
End Sub
Private Sub Command2_Click()
On Error Resume Next
CommonDialog1.Filter = "文档文件(*.txt)|*.txt|所有文件(*.*)|*.*"
CommonDialog1.ShowSave
Open CommonDialog1.FileName For Output As #1
Print #1, Text1.Text
Close 1
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -