vb用Command打开网页的代码,简单点我是菜鸟
2个回答
展开全部
'一次性解决你的问题:
'通用声明
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
Const SW_SHOW = 5
'三种调用
ShellExecute Me.hwnd, "open", App.Path & "\123.txt", "", "", SW_SHOW '打开文件
Call ShellExecute(Me.hwnd, "Open", "这里输入网页地址", "", App.Path, 1) '打开网址
Call ShellExecute(Me.hwnd, "Open", "mailto:clk186@163.com?Subject=主题&body=正文&Attach=doc1", "", App.Path, 1) '打开邮箱
不复杂,尽管使用,用用就知道了
'通用声明
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
Const SW_SHOW = 5
'三种调用
ShellExecute Me.hwnd, "open", App.Path & "\123.txt", "", "", SW_SHOW '打开文件
Call ShellExecute(Me.hwnd, "Open", "这里输入网页地址", "", App.Path, 1) '打开网址
Call ShellExecute(Me.hwnd, "Open", "mailto:clk186@163.com?Subject=主题&body=正文&Attach=doc1", "", App.Path, 1) '打开邮箱
不复杂,尽管使用,用用就知道了
展开全部
你看下这个.
追问
我要在别人的电脑上打开,可以自动选择浏览器的
参考资料: http://zhidao.baidu.com/question/415284294.html?oldq=1
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询