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 LongPrivate Sub Command1_Click() ShellExecute 0&, "open", "http://www.163.com", 0&, 0&, 1& End Sub这样做不行吗?我用IE7,是打开一个新的页面
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 LongPrivate Sub Command1_Click() ShellExecute Me.hwnd, "open", "http://www.baidu.com", 0&, 0&, 1& End Sub
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 LongPrivate Sub Command1_Click()
ShellExecute 0&, "open", "http://www.163.com", 0&, 0&, 1&
End Sub这样做不行吗?我用IE7,是打开一个新的页面
ShellExecute Me.hwnd, "open", "http://www.baidu.com", 0&, 0&, 1&
End Sub