设在工程中有一个标准模块,其中定义了如下记录类型:TyPe Record ID A3 IntegerName As String*20 End TyPe 在窗体中添加一个名为Command1的命令按钮,假设d:F1.dat文件中含有5个用户自定义类型的记录。要求当执行事件过程Command1_Click时,随机访问该文件,并把文件中的第4条记录读出。下列能够完成该操作的程序段是
A.Private Sub Command1_Click( ) Dim MyRecord As Record,PositionOpen"d:F1.dat"For Random As#1 Len=Len(My RecorPosition=4 Get#1,Position,MyrecordClose #1End Sub
B.Private Sub Command1_Click( )Dim MyRecord As Record,Position Open"d:F1.dat"For Random As #1 Len=Len(MyRecorPosition=4Put #1,Position,MyRecordClose#1 End Sub
C.Private Sub Command1_Click( )Dim MyRecord As Record,PositionOpen"d:F1.dar"For OutPut As #1 Len=Len(My RecorPosition=4Get #1,Position,MyRecordClose#1 End Sub
D.Private Sub Command1_Click( )Dim MyRecord As record,PositionOpen"d:F1.dat"For lnput As #1 Len=Len(MyRecorPosition=4Get #1,Position,MyRecordClose#1End Sub