请问,我在VB里怎么样通过一个按纽来调用一个网页文件?请写详细代码告之,谢谢!

解决方案 »

  1.   

    是一个文件还是URL?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'URL:
    Private Sub cmdURL_Click()
    ShellExecute 0, "open", "http://www.csdn.net", vbNullString, vbNullString, 3
    End Sub'File:
    Private Sub cmdFile_Click()
    ShellExecute 0, "open", "file://c:/1.htm", vbNullString, vbNullString, 0
    End Sub
      

  2.   

    shell "执行程序名   文件路径"
    如  shell  "IEXPLORE.EXE  c:\abc.htm"
    则打开abc.htm文件  注意一定要用空格