Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to call IE from VFP app
Message
 
 
To
04/08/2009 08:48:02
Jerry Tovar
Dana Corporation Dana It
Maumee, Ohio, United States
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 9 SP2
Miscellaneous
Thread ID:
01416039
Message ID:
01416044
Views:
68
Jerry,

Instead of ShellExecute explicitly manipulate IE as an object.

loIE = CREATEOBJECT("InternetExplorer.Application")

see message#1172480

>We have a VFP9 Windows app that displays our customers information. We want to create a button that will open a new IE window and pass the current customer ID to our ASP.Net web app.
>
>Below is what we are currently doing. This works but if there is a IE session currently running, the below will open the new URL in a new tab in the current session of IE. This causes problems such as cookies being overwritten etc...
>
>How can we make sure a new IE session gets opened that ignores any other IE session?
>
>Thanks,
>
>Jerry
>
>
>tc_url = "www.ouraddress.com"
>tc_Action = [OPEN]
>tc_Directory = SYS(2023)
>tc_Params = []
>
>DECLARE INTEGER ShellExecute ;
>	IN SHELL32.dll ;
>	INTEGER nWinHandle, ;
>	STRING cOperation,  ;
>	STRING cFileName,   ;
>	STRING cParameters, ;
>	STRING cDirectory,  ;
>	INTEGER nShowWindow
>
>DECLARE INTEGER FindWindow ;
>	IN WIN32API STRING cNull, STRING cWinName
>
>ShellExecute(FindWindow(0, _SCREEN.Caption), ;
>	tc_Action, tc_Url, tc_Params, tc_Directory, 1)
>
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform