vb6打开默认浏览器网站

| |
[不指定 2021/11/10 18:17 | by admin ]
1、这里介绍vb打开网站问题,用最简单的方式打开杀毒一般都拦截,例如
Shell "cmd /k Explorer.exe http://www.hkfx.net"


2、其中shell函数调用执行一个可执行文件explorer.exe所以这种最方便的打开方式会被提示拦截询问,下面代码可以直接打开不提示,相对可靠些。

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 web_Click() '这里是按钮名称web
  ShellExecute 0, "open", "http://www.hkfx.net", 0, 0, 1
End Sub


VB6编程 | 评论(0) | 引用(0) | 阅读(2115)
发表评论
表情
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
打开HTML
打开UBB
打开表情
隐藏
昵称   密码   游客无需密码
网址   电邮   [注册]
               

验证码 不区分大小写