[试题]

( 9 ) 窗体上有名称为 Command1 的命令按钮及名称为 Text1 、 能显示多行文本的文本框 。 程序运行后 ,如果单击命令按钮,则可打开磁盘文件 c:/test.txt ,并将文件中的内容(多行文本)显示在文本框中。

下面是实现此功能的程序,请填空。

Private Sub Command1_Click()

Text1= ””

Number=FreeFile

Open “ c:/test.txt ” For Input As Number

D.o While Not Eof( ( 14 ) )

Line Input #Number,s

Text1.Text=Text1.Text+ ( 15 ) +Chr(13)+Chr(10)

Loop

C.lose Number

E.nd Sub

参考答案与解析: