Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to call IE from VFP app
Message
De
04/08/2009 10:45:24
Jerry Tovar
Dana Corporation Dana It
Maumee, Ohio, États-Unis
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 9 SP2
Divers
Thread ID:
01416039
Message ID:
01416048
Vues:
52
These examples work and a new IE window is opened, but if there is already an IE window open, the settings made in the new session are also reflected in the old session.

For example, when our URL is called, the page being called accepts the parameters and sets cookies in the browser. If I use either of the techniques below to call a new IE window with a different customer ID, the web page getting called will accept the new parameter and set the cookies correctly, but these same cookie values are also set on the other IE window(s).

The only way around this is to manually open a new IE window and manually login to our web page. Then we can have multiple IE windows open, each with their own cookie settings and each with their own unique customer information showing. We just can't accomplish this with either of the below techniques.

Thanks,

Jerry



>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)
>>
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform