怎样在窗体上建立一个超连接,单击后调用IE打开,多多指教

解决方案 »

  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 Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
      Label1(4).ForeColor = vbBlue
    End SubPrivate Sub Label1_Click(Index As Integer)
    On Error resume next
      'Shell "C:\Program Files\Internet Explorer\IEXPLORE.EXE www://sohu.com, vbMinimizedFocus
      ShellExecute Me.hwnd, "open", "http://www.sohu.com", vbNullString, vbNullString, 1
      Exit Sub
    End Sub
      

  2.   

    请在窗体上放置两个标签控件:Label1、Label2
    Option Explicit
    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 0&, "Open", "mailto:[email protected]", "", App.Path, 1
    End Sub
    Private Sub Label2_Click()
        ShellExecute 0&, "Open", "http://www.capricciososoft.com", "", App.Path, 1
    End Sub
      

  3.   

    用shellexecte这个api函数就可以了
    同意楼上的。