怎么办啊!弄不好了,帮我看看把!!!!!求教
vb吧
全部回复
仅看楼主
level 1
wjp6122408 楼主
Private Sub cmdAddFile_Click()
With ComDialog
.ShowOpen
If Len(.FileName) > 0 Then
lstAttachments.AddItem .FileName
End If
End With
End Sub
我想指定打开C:/123.bmp 怎么改啊!!!!!帮忙改下!!!!!
2011年10月23日 07点10分 1
level 4
打开文件的方法不就是:
Open“C:\文件名”for input as #文件号
2011年10月23日 07点10分 2
level 1
wjp6122408 楼主
我发的代码中他是选择文件的,我要做成指定的。
2011年10月23日 08点10分 3
level 10
Open“C:/123.bmp ”for input as #文件号
2011年10月23日 13点10分 4
level 15
最简单的方法
方法1:shell "explorer C:/123.bmp"
方法2:ShellExecute(Me.hwnd, "open", C:/123.bmp", C:/123.bmp", vbNullString, 1)
2011年10月24日 02点10分 5
level 15
这个是用windows默认关联的程序来打开。
2011年10月24日 02点10分 6
level 15
你这个是打开顺序文件的方法。本问题中不适用。
2011年10月24日 02点10分 7
level 15
lstAttachments.AddItem "C:/123.bmp"
难道是这样的?
2011年10月24日 02点10分 8
level 1
不是C:\123.bmp吗?怎么方向反了
2011年10月24日 04点10分 9
1