VB中实现超级连接的几种方法,
注:代码都系从网上收集
1,建立一个command,或者label,都行,
然后双击,在起click状态下输入这样的语句,比如,label标签,
Private Sub Label1_Click()
Shell “explorer.exe http://www.daokers.cn/”
End Sub
2,
Private Sub Label1_Click()
Dim a As String
a = Shell(“Explorer.exe http://www.daokers.cn/“, 3)
End Sub
3,用API实现
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 Label4_Click()
On Error Resume Next
Dim Dummy As Long
Dim HomePageUrl As String
HomePageUrl = “http://www.daokers.cn”
Dummy = ShellExecute(0&, vbNullString, HomePageUrl, vbNullString, vbNullString, vbNormalFocus)
End Sub