有小問題
vb 用command按一下 就彈出 yahoo.com.hk 這個網址
過程如下
可以給我程式嗎
thx --------------------编程问答--------------------
'在窗体申明中添加:--------------------编程问答-------------------- '在窗体申明中添加:
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()
Dim a As Long
a = ShellExecute(0, "open", "http://hk.yahoo.com", vbNull, vbNull, 0)
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 sub command1_click()
Dim a As Long
a = ShellExecute(0, "open", "http://hk.yahoo.com", vbNull, vbNull, 0)
end sub
--------------------编程问答--------------------
Private Sub Command1_Click()
Dim ieView As Object
Set ieView = GetObject("", "InternetExplorer.Application")
ieView.Navigate "http://hk.yahoo.com, navNoReadFromCache"
ieView.Visible = True
End Sub
补充:VB , 基础类