• 欢迎访问金刀客博客!
  • 2024,春节快乐!

VB中实现超级连接的几种方法

原创天空 admin 8530次浏览 已收录 0个评论

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


金刀客博客 , 版权所有丨如未注明 , 均为原创丨本网站采用BY-NC-SA协议进行授权 , 转载请注明VB中实现超级连接的几种方法
喜欢 (5)

Warning: Attempt to read property "comment_author_email" on null in /www/wwwroot/daokers.com/public_html/wp-content/themes/Git-finally/comments.php on line 44
发表我的评论
取消评论
表情 贴图 加粗 删除线 居中 斜体 签到