如何用vb打开一个文件夹啊各位大哥??
例如:
我一点一个按就要用windows的explorer打开c盘

解决方案 »

  1.   

    Private Sub Command1_Click()
         Shell "explorer c:", 1
    End Sub
      

  2.   

    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 Long
    Sub opendir(ByVal dirpath As String)
     ShellExecute hwnd, "open", dirpath, vbNullString, vbNullString, 5
    End Sub
    Private Sub Command1_Click()
    Call opendir("c:\windows\system\")
    End Sub