在form上面设置一个label1,将label1.caption=”http://lovepc.blogchina.com”。
添加如下代码:
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 Label1_Click()
ShellExecute 0, “open”, http://lovepc.blogchina.com, vbNullString, vbNullString, 3
End Sub
按F5运行,点击form上的链接,就可以打开浏览器到制定的网址了。
[tags]超链接,vb,窗体[/tags]
转载文章请注明转载自:ThinkAgain - Let's Blog!

























