📄 form1.frm
字号:
VERSION 5.00
Begin VB.Form Form1
Caption = "Form1"
ClientHeight = 3810
ClientLeft = 60
ClientTop = 345
ClientWidth = 4920
LinkTopic = "Form1"
ScaleHeight = 3810
ScaleWidth = 4920
StartUpPosition = 3 '窗口缺省
Begin VB.TextBox Text4
Height = 495
Left = 2520
TabIndex = 5
Top = 2760
Width = 1455
End
Begin VB.Frame Frame2
Caption = "读出数据"
Height = 1335
Left = 360
TabIndex = 1
Top = 2280
Width = 3735
Begin VB.TextBox Text3
Height = 495
Left = 240
TabIndex = 4
Top = 480
Width = 1455
End
End
Begin VB.Frame Frame1
Caption = "写入数据"
Height = 1335
Left = 360
TabIndex = 0
Top = 360
Width = 3735
Begin VB.TextBox Text2
Height = 495
Left = 2160
TabIndex = 3
Top = 480
Width = 1455
End
Begin VB.TextBox Text1
Height = 495
Left = 240
TabIndex = 2
Top = 480
Width = 1455
End
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() '写入数据
Open "c:\example.dat" For Output As #1
num1 = Val(Text1.Text)
num2 = Val(Text2.Text)
Write #1, num1, num2
Close #1
End Sub
Private Sub Command2_Click() '读出数据
Open "c:\example.dat" For Input As #1
Input #1, X1, X2
Text3 = Str(X1)
Text4 = Str(X2)
Close #1
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -