汽车绞盘安装图解:怎样用VB设计弹出网页?

来源:百度文库 编辑:高校问答 时间:2024/05/04 00:39:22
怎样用VB设计弹出网页?一点击按钮就弹出网页那种

方法1:用IE打开
Dim RetVal As Long

RetVal = Shell("iexplore.exe http://www.baidu.com", 0)

方法2,用API打开:
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 Sub Command1_Click()

ShellExecute Me.hwnd, "open", "http://www.baidu.com", "", "", 5
End Sub

方法1:用IE打开
Dim RetVal As Long

RetVal = Shell("iexplore.exe http://www.baidu.com", 0)

方法2,用API打开:
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 Sub Command1_Click()

ShellExecute Me.hwnd, "open", "http://www.baidu.com", "", "", 5
End Sub