PDA

Click to See Complete Forum and Search --> : Internet Explorer ActiveX Control


levinll
May 21st, 2001, 02:37 PM
I'm trying to use the same instance of an Internet Explorer control, but I'm having some problems.

I can navigate to different pages using this control, but I want the ability to have IE become the active screen whenever I change pages.

I'm using the following code to launch IE and navigate.

Set ie = GetObject(, "InternetExplorer.Application")

If ie Is Nothing Then
Set ie = CreateObject("InternetExplorer.Application")
ie.Toolbar = False
ie.StatusBar = False
ie.Navigate (SATSwebSite)
ie.Visible = True
Else
' double check to make sure the window is still open.
HWND = ie.HWND
If HWND = 0 Then
Set ie = Nothing
Set ie = CreateObject("InternetExplorer.Application")
ie.Toolbar = False
ie.StatusBar = False
ie.Navigate (SATSwebSite)
ie.Visible = True
Else
ie.Navigate (SATSSearchString)
End If
End If

Sastraxi
May 21st, 2001, 10:32 PM
IE.SetFocus (if there is such method) otherwise you must post a message to it to set it's focus.

levinll
May 22nd, 2001, 08:20 AM
There is no setfocus method. What do you mean about "posting a message" to it ?