单选题
假定在工程文件中有一个标准模块,其中定义了如下记录类型
Type Books
NalTle As String*10
TelNum As
String*20
End Type
要求当执行事件过程ComlBandl_Click时,在顺序文件Person.txt中写入一条记录。下列能够完成该操作的事件过程是{{U}}
{{/U}}。
- A.Ptivate Sub Commandl_Click() DimB As Books
Open"c:/Person.txt"For Output As#1
B.Name=InputBox(“输入姓名”) B.TelNum=InputBox(“输入电话号码”)
Whte#1,B.Name,B.TelNum Close#1
End Sub B.Private Sub Commandl_Crick() DimB As
Books Open"C:/Person.txt"ForInput As#1
B.Name=InputBox(“输入姓名”)
- B.TelNum=InputBox(“输入电话号码”)
Prin(#1,B.Name,B.Te1Num Close#1 End Sub
- C.Private Sub Conullandl_CHCk() DimBAs Books
Open"c:/Person.txt"For Ouputut As#1
Name=hputBox(“输入姓名”) Temum=InputBox(“输入电话号码”)
Whte#1,B Close#1 End Sub
- D.Privam Sub Commnandl_Click() DimBAsBook
Open"C:/Person.txt"For Input As#1
Name=InputBox(“输入姓名”) TelNum=InputBox(“输入电话号码”)
Print #1,B.Name,B.TelNum Close#1
End Sub