在vb中怎样调用IE打开一个网页

在vb中怎样调用IE打开一个网页,第1张

用 shell 调用外部程序,比如

Shell "C:\Program Files (x86)\Internet Explorer\IExplore.exe www.baidu.com"

IE的位置跟Windows版本有关,以上是Win7 64位,可以自行查找确定

不要用shell

先引用shdocvw.dll,他是Internet Explorer的类库

加一个命令按钮

Dim ie as InternetExplorer

Private Sub Command1_Click()

Set ie = GetObject("","InternetExplorer.Application")

ie.AddressBar=True

ie.Visible=True

End Sub


欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/tougao/11368816.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2023-05-15
下一篇 2023-05-15

发表评论

登录后才能评论

评论列表(0条)

保存