通过Label连接一个网站
具体代码和API我忘了
哪位大哥写全点,

解决方案 »

  1.   

    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 Sub label1_Click()
        Dim a As Long
        a = ShellExecute(0, "open", "http://www.csdn.net", vbNull, vbNull, 0)
    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 LongPrivate Sub Label1_Click()
        ShellExecute Me.hwnd, "open", "www.sohu.com", vbNullString, vbNullString, 1
    End Sub
      

  3.   

    不用API也可以shell "start http://www.sohu.com"
      

  4.   

    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 Sub label1_DbClick()
        Dim OpenUrl As Long
        OpenUrl = ShellExecute(0, "open", lablel1.caption, vbNull, vbNull, 0)
    End Sub
      

  5.   

    Private Sub Label1_Click()
        Shell "explorer http://www.csdn.net"
    End Sub