怎样在FORM上设置文字超链,如我的邮箱地址或主页名称,鼠标移至上面时显示“手”的形状,单击后出现OUTLOOK或IE(地址栏就是该文字)。请给予解答为谢!

解决方案 »

  1.   

    先做一个Label,把它的MousePointer属性设成99,再找一个手形图标,将它的MouseIcon属性设成该图标,然后加代码:
    ' 邮箱
    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 Me.hwnd, "open", "mailto:[email protected]", vbNullString, vbNullString, ByVal 0&
    End Sub' 网页
    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 Me.hwnd, "open", "http://www.163.com", vbNullString, vbNullString, ByVal 0&
    End Sub