VB 里面点击按钮弹出一个网页改怎么实现?
VB 里面点击按钮弹出一个网页改怎么实现? --------------------编程问答-------------------- shell --------------------编程问答-------------------- --------------------编程问答-------------------- --------------------编程问答-------------------- shell "explorer http://www.baidu.com",vbnormalfocus--------------------编程问答-------------------- Shell "explorer.exe http://hibeidou.taobao.com", vbMaximizedFocus
把http://hibeidou.taobao.com 改成自己要的地址就可以了 --------------------编程问答-------------------- 好吧我来总结下吧,总计有7种方法。
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 Command1_Click()
' Shell "rundll32.exe url.dll,FileProtocolHandler http://www.baidu.com" '方法1
' Shell "cmd.exe /c start http://www.baidu.com", 0 '方法2
' Shell "explorer.exe http://www.baidu.com", 1 '方法3
' Shell "IEXPLORE.EXE http://www.baidu.com", 1 '方法4
' ShellExecute hwnd, "open", "http://www.baidu.com", "", "", 1 '方法5
ShellExecute 0, "open", "IEXPLORE.EXE", "http://www.baidu.com", "", 1 '方法6
End Sub
'方法7
Dim ie As Object
Set ie = CreateObject("internetexplorer.application")
ie.Visible = True
ie.navigate "http://www.baidu.com"
补充:VB , 基础类