谁知道怎么用VB来打开IE的网页,并且能转到我需要的网址?
发布网友
发布时间:2023-01-08 06:27
我来回答
共1个回答
热心网友
时间:2023-10-21 09:12
有如下三种方法:
⑴.【API法】
'/*API声明*/
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 Const SW_SHOW = 5
'/*调用方法*/
Ret = ShellExecute(0, "open", "http://www.baidu.com", "", "", SW_SHOW)
⑵.【CMD法】
Shell "CMD /c start http://www.baidu.com"
⑶.【Explorer法】
Shell "Explorer http://www.baidu.com"