填空题

窗体上已有名称分别为Dri、,e1、Dirl、Filel的驱动器列表框、目录列表框和文件列表框,且有1个名称为Textl的文本框。以下程序的功能是:将指定位置中扩展名为“*.txt” 的文件显示在Filel中,如果双击Filel中的某个文件,则在Textl中显示该文件的内容。请填空。
Private Sub Form_Load()
File1.Pattern =  ______
End Sub
Private Sub Dir1_Change()
File1.Path = Dir1.Path
End Sub
Private Sub Drive1_Change()
Dir1.Path = Drive1.Drive
End Sub
Private Sub File1_DblClick()
Dim s As String * 1
If Right(File1.Path, 1) = "\" Then
f_name = File1.Path + File1.FileName
Else
f_name = File1.Path + "\" + File1.FileName
End If
Open f_name  ______ As #1
Text1.Text = ""
Do While  ______
s = Input(1, #1)
Text1.Text = Text1.Text + s
Loop
Close #1
End Sub

发布于 2022-05-11 10:17:49

登录后免费查看答案
关注者
0
被浏览
15
1 个回答
推荐阅读
知识点
面圈网VIP题库

面圈网VIP题库全新上线,海量真题题库资源。 90大类考试,超10万份考试真题开放下载啦

去下载看看