急!如何VB文件列表框双击文件名在文本框中显示文件内容?

2024-11-20 04:36:06
推荐回答(1个)
回答(1):

看了你的问题了。。。楼主给我分啊。。。我已经帮你答了啊!!!!
修改file_dblclick如下
Private
Sub
file_dblclick()
Dim
s$
If
Right(File1.Path,
1)
=
"\"
Then
fName
=
File1.Path
+
File1.FileName
Else
fName
=
File1.Path
+
"\"
+
File1.FileName
End
If
Text1.Text
=
fName
Text1.MultiLine
=
True
Open
fName
For
input
As
#1
Do
until
EOF(1)
Line
Input
#1,
s
Text1.Text
=
Text1.Text
&
chr(13)
&
chr(10)
&
s
Loop
Close
#1
End
Sub