Timothy,
I'm not sure where you'd implement it to be honest at this point. When I run the code fragment below using
http://www.google.com as the URL the browser window already comes on top of the VFP window. I see the same thing if I put the code into a form button.click() IE is ontop of the VFP window.
You must have some other code that is pulling focus back to your VFP window.
Immediately calling GetTopWindow() after the ShellExecute and saving that hWnd you should be able to use the other SetWindowPos() calls to push the browser to the top later on.
PS I'm headed to the beach so someone else will have to help on this until Tuesday.
>Where do I actually implement your below code? I have modified my code which is in the form's init and looks like this. Without the "wait" statment, the instance of IE starts but VFP still is ontop, with the wait statment, IE comes to the forefront.
>
>
>DECLARE INTEGER ShellExecute IN shell32.dll ;
> INTEGER hndWin, ;
> STRING cAction, ;
> STRING cFileName, ;
> STRING cParams, ;
> STRING cDir, ;
> INTEGER nShowWin
>
>
>lcPdfFileName = "
https://lmca-server/lmca/bstock.aspx"
>ShellExecute(0, "Open", lcPdfFileName, "", "", 1)
>
>wait