如果要做成“访问主页”之类的话,用下面的方法: 1.调用浏览器,shell (explore.exe http://×××.×××.×××.×××) 2.调用api shellexecute 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 Const SW_SHOWNORMAL = 1 Private Sub Form_Load() 'Send an E-Mail to the KPD-Team ShellExecute Me.hwnd, vbNullString, "http://×××.×××.×××.×××", vbNullString, "C:\", SW_SHOWNORMAL End Sub我个人推荐第一个方法,不需要api函数,代码简单、方便!
1.调用浏览器,shell (explore.exe http://×××.×××.×××.×××)
2.调用api shellexecute
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
Const SW_SHOWNORMAL = 1
Private Sub Form_Load()
'Send an E-Mail to the KPD-Team
ShellExecute Me.hwnd, vbNullString, "http://×××.×××.×××.×××", vbNullString, "C:\", SW_SHOWNORMAL
End Sub我个人推荐第一个方法,不需要api函数,代码简单、方便!