VB怎样编写单击按钮自动打开两个网页。高手截图一下。悬赏分追加!!
发布网友
发布时间:2024-09-28 23:30
我来回答
共3个回答
热心网友
时间:2024-10-29 09:24
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
Function OpenURL(ByVal url As String) '调用此函数,url为文件路径
Dim lngReturn As Long
lngReturn = ShellExecute(Me.hwnd, "open", url, "", "", 0)
End Function
Private Sub Command1_Click()
Call OpenURL(网址一)
DoEvents
Call OpenURL(网址二)
End Sub
测试通过,VB6.0+Windows Xp Home Edition环境
热心网友
时间:2024-10-29 09:28
Private Sub Command1_Click()
url1 = "http://hi.baidu.com/mogosoft"
url2= "http://hi.baidu.com/mogosoft"
Shell "explorer " & url1, 0
Shell "explorer " & url2, 0
End Sub
热心网友
时间:2024-10-29 09:29
最好先追加。