在OpenFileDialog 控件中找到所需要的文件,选择后点击打开就可以直接开启该文件(如同双击文件名的效果)?
请高手指点!

解决方案 »

  1.   

    这个必须使用到ShellExecute的API了。Private Declare Function ShellExecute Lib "shell32.dll" Alias
    "ShellExecuteA" _
        (ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As
    String, _
        ByVal lpParameters As String, ByVal lpDirectory As String, ByVal
    nShowCmd _
        As Long) As LongPrivate Const SW_SHOWNORMAL = 1ShellExecute Me.hwnd, "Open", "D:\档案名字", vbNullString,"D:\", SW_SHOWNORMAL
      

  2.   

    shell("Explorer D:\档案名字",vbnomalfocus)
      

  3.   

     str=DLog.filename
    shell str
      

  4.   

    我说的是可执行文件! 其他的文件比如DOC文件,需要加OFFIC程序路劲在前面
      

  5.   

    不过楼上的的Explorer程序好象通用