-
Hi everyone...
I have the following:
'API call to Findwindow up here
Private Sub Command1_Click()
Dim hwnd As Long ' Receives IE window handle
Dim retval As Long ' Return value
Dim MyAppID As String ' Text variable for opening IE
MyAppID = Shell("C:\path_2_IE_here\IEXPLORE.EXE")
Do while hwnd <> 0 Then
MsgBox "Hello!"
Exit Do
Loop
End Sub
(Haven't worked out how you guys write in colour on this site yet).
NO 1 - How can I specify in above a site to goto (i.e.- http://www.vbworld.com)?
NO 2 - Above is a dummy based on what I need to do. I am trying to do a loop so that the msgbox code executes AFTER IE has opened, but with no luck!
Can anyone help me please? thank you!
Alex Read
-
use the [ code ] [ / code ] tags without the spaces...
use the ShellExecute API,
Code:
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 Const SW_SHOWNORMAL = 1
Public Sub gotoweb(URL As String)
Call ShellExecute(0&, vbNullString, URL, vbNullString, "C:\", SW_SHOWNORMAL)
End Sub
I took this code from a Vb-world demo program I downloaded....
(The Lander Game)