[单项选择题] 设在工程中有一个标准模块,其中定义了如下记录类型Type Books Name As String*10 TelNum As String*20 End Type 在窗体上画一个
[单项选择题] 设在工程中有一个标准模块,其中定义了如下记录类型
Type Books
Name As String*10
TelNum As String*20
End Type
在窗体上画一个名为Command1的命令按钮,要求当执行事件过程Command1_Click时,在顺序文件
Person.txt中写入一条记录。下列能够完成该操作的事件过程是
A.Private Sub Command1_Click( )
Dim B As Books
Open”c:PerSon.txt"For Output As #1
B.Name=InpuB。x(“输入姓名”)B.TelNuln=InputBox(“输入电话号码”)
Wdte#1.B.Name,B.TelNum
Close#1
End SubB.PIivate Sub Command1_C1ick()
Dim B As BOOks
OPen”c:Person.txt"FOr lnput As #1B.Name:InputBox(“输人姓名”)B.TelNum=InputBox(“输入电话号码”)
Print#1,B.Name,B.TelNum
C1ose#1
End Sub
C.Private Sub Command1_Chck( )
Dim B As Books
Open”c:Person.ht”For Output As#1B.N
D.Pnvate Sub Command1_Click( )
Open”c:Person.txt"For lnput As #1
Name=InputBox(“输入姓名”)
TalNum=InputBox(“输入电话号码”)
Print,Name,TelNum
Close#1
End Sub
参考答案: