Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to make IE the active window?
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
01134211
Message ID:
01137315
Views:
27
Jim, is there a way to pass back selected item in IE to VFP using this obrowser ACTIVEX?


>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
"Build a man a fire, and he's warm for a day.
Set a man on fire, and he's warm for the rest of his life."
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform