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 Longret = ShellExecute(Me.hwnd, "open", Label2.Caption, "", strPath, 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 ShellExecute Me.hWnd, "open", "http://www.csdn.net", vbNullString, vbNullString, SW_SHOW
第二种方法:Shell "explorer http://www.csdn.net"
Dim goweb As String goweb = "explorer.exe " & "url" '在explorer.exe后面一定要加一两个空格 Shell goweb, vbMaximizedFocus
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
ShellExecute Me.hWnd, "open", "http://www.csdn.net", vbNullString, vbNullString, SW_SHOW
第二种方法:Shell "explorer http://www.csdn.net"
goweb = "explorer.exe " & "url" '在explorer.exe后面一定要加一两个空格
Shell goweb, vbMaximizedFocus