依BlowFish的思路,可以如下
Dim test As New Shell
test.shellexecute ("http://www.google.com")
同时菜单Project->References下要选择“Microsoft Shell Controls and Automation”,即\windows\system32\shell32.dll。
最初由 n0n1inear 发布 依BlowFish的思路,可以如下 Dim test As New Shell test.shellexecute ("http://www.google.com") 同时菜单Project->References下要选择“Microsoft Shell Controls and Automation”,即\windows\system32\shell32.dll。
方法一:
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 OK_Click()
ShellExecute(0&, vbNullString, "http://bbs.pediy.com", vbNullString, vbNullString, vbNormalFocus)
End Sub
方法二:
Private Sub OK_Click()
Set ie = New InternetExplorer
ie.Visible = True
ie.Navigate "http://bbs.pediy.com"
End Sub