比如在label中写入网址,通点单击后,如何操作会自动打开IE浏览器,并访问这个网站?

解决方案 »

  1.   

    Public 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 0, "", "www.163.com", "", "", 5
    End Sub
      

  2.   

    ShellExecute 0, "", Url, "", "", 5
      

  3.   

    TO:ljhdi() 
    能详细点吗?我按你这样做不行呀,会出错的
      

  4.   

    Private Sub Command1_Click()
    Call Shell("explorer.exe http://www.csdn.net", 1)
    End Sub
      

  5.   

    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
    Private Sub Command1_Click()
        Call ShellExecute(Form1.hWnd, "open", Text1.Text, vbNullString, vbNullString, &H0)
    End Sub