>Hi, I am trying to bring Internet Explorer to the foreground using FindWindowA but run into a problem, I think with an incorrect classname? Not Sure. Can anyone help with this?
>Thanks
>Steve
>
> GetThisUrl = "
http://www.levelextreme.com/wconnect/wc.dll?FournierTransformation"
>
> release oie
> *LOCAL oie as internetexplorer.application
> oie = createobject( "internetexplorer.application" )
> oie.Visible = .t.
> oie.Navigate( (GetThisUrl) )
>
>
> #DEFINE swp_nosize 1
> #DEFINE swp_nomove 2
> #DEFINE hwnd_topmost -1
> #DEFINE hwnd_notopmost -2
>
> *FindWindowA see pages 180 in Office Automation
> DECLARE LONG FindWindowA IN WIN32API STRING class, STRING title
> * set windo position
> DECLARE SetWindowPos in WIN32API LONG HWND, LONG hwndafter, ;
> LONG x, LONG y, LONG cx, LONG cy, LONG flags
>
> *Capture captions
> hWndExp = FindWindowA("IEFrame" , oie.Caption) ****<<---------------- the problem and error here
A couple of things. These apply to IE 6.0, I don't know about previous versions. First, IE 6.0 has it's own hWnd property for the window handle. Second, it doesn't have a Caption property. Third, the Windows Script Host's Shell object has an AppActivate method. Simply pass it the title bar caption.
George
Ubi caritas et amor, deus ibi est