Hi!
Look to the ShellExecute() API function in the API section.
In addition, you can try to catch the window handle of the main window opened when browser runs and put it to foreground by API functions.
Finally, my suggestion is that the cause is a menu. When you click on menu, VFP window remains activated because menu events and activity. Did you tried running of URL by the button's click event? Do it show it foreground? If no, than use API functions as suggested above. If yes, try following solution:
Make a timer that fires, for example, each 10 milliseconds. Make it inactive. In the timer event do the URL running and deactivate timer. In the menu activate the timer. This way, menu will activate timer and disappear normally. Than timer will fire after all menu activity and run browser normally.
>I want one of my apps' menu choices to access a URL target. This works fine using a menu procedure:
>
>_shxEpost = CREATEOBJECT("_shellexecute")
>_shxEpost.ShellExecute(URL)
>
>The problem is that this code doesn't bring the browser window forward. Does anyone know how to do that?
Vlad Grynchyshyn, Project Manager, MCP
vgryn@yahoo.comICQ #10709245
The professional level of programmer could be determined by level of stupidity of his/her bugs
It is not appropriate to say that question is "foolish". There could be only foolish answers. Everybody passed period of time when knows nothing about something.