vb怎么实现点击文字弹网页?

来源:百度知道 编辑:UC知道 时间:2024/06/22 21:07:11
如题??

使用API函数ShellExecute,声明如下
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()
ShellExecute Me.hwnd, "open", "http://www.baidu.com", vbNullString, vbNullString, vbNormalFocus
End Sub

Private Sub Label1_Click()

shell "C:\Program Files\Internet Explorer\iexplore.exe"

End Sub

shell "explorer http://www.baidu.com"