📄 form1.ebf
字号:
VERSION 5.00
Object = "{25C953A7-5464-11D1-A714-00AA0044064C}#1.0#0"; "MSCEFILE.DLL"
Begin VB.Form Form1
Appearance = 0 'Flat
BackColor = &H80000001&
Caption = "Form1"
ClientHeight = 5385
ClientLeft = 60
ClientTop = 840
ClientWidth = 6165
ForeColor = &H80000008&
ScaleHeight = 5385
ScaleWidth = 6165
ShowOK = -1 'True
Begin FILECTLCtl.File File1
Left = 1080
Top = 4440
_cx = 1000
_cy = 1000
End
Begin FILECTLCtl.FileSystem FileSystem1
Left = 3360
Top = 4200
_cx = 2200
_cy = 1400
End
Begin VBCE.CommandButton Command1
Height = 495
Left = 600
TabIndex = 0
Top = 2040
Width = 975
_cx = 1720
_cy = 873
BackColor = 12632256
Caption = "检查"
Enabled = -1 'True
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Style = 0
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
'如果文件存在,则读出来,否则创建一个新文件并将“123abc”写入到文件中
Private Sub Command1_Click()
If FileSystem1.Dir("\My Documents\newatom.TXT") = "" Then
File1.Open "\My Documents\newatom.TXT", fsModeOutput
File1.LinePrint "123abc"
File1.Close
MsgBox "文件不存在", vbInformation, "创建文件"
Else
Dim str As String
File1.Open "\My Documents\newatom.txt", fsModeInput
str = File1.Input(6)
File1.Close
MsgBox str, vbExclamation, "文件已经存在"
End If
End Sub
Private Sub Form_OKClick()
App.End
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -