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 conSwNormal = 1Private Sub Command1_Click() ShellExecute Me.hwnd, "open", "http://www.google.com", vbNullString, vbNullString, conSwNormal End Sub
Private Sub page_Click() Shell "Explorer http://www.52520.com" End Sub
'1方法一 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 conSwNormal = 1Private Sub Command1_Click() ShellExecute Me.hwnd, "open", "http://www.google.com", vbNullString, vbNullString, conSwNormal End Sub '2方法二 Private Sub Command1_Click() Shell "Explorer http://www.52520.com" End Sub
Private Const conSwNormal = 1Private Sub Command1_Click()
ShellExecute Me.hwnd, "open", "http://www.google.com", vbNullString, vbNullString, conSwNormal
End Sub
Shell "Explorer http://www.52520.com"
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 Long
Private Const conSwNormal = 1Private Sub Command1_Click()
ShellExecute Me.hwnd, "open", "http://www.google.com", vbNullString, vbNullString, conSwNormal
End Sub
'2方法二
Private Sub Command1_Click()
Shell "Explorer http://www.52520.com"
End Sub