Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
EXE to COMEXE back to EXE
Message
 
 
À
06/12/2001 11:48:25
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Divers
Thread ID:
00590598
Message ID:
00590607
Vues:
28
>I have written an 2 executables. One is an ActiveX client, One is the ActiveX server. I use WinAPI calls to ensure that each program can be run only once and if the exe is already runnning BringWindowToTop.
>
>1) Start MyClient.EXE
>2) MyClient.EXE instantiates the object Model of Myserver.EXE by creating the Myserver.EXE Application object.
>3) MyClient.EXE uses a services of MyServer.EXE oAPp.DoSomething
>4) MyClient.EXE destroys Myserver.EXE App Object
>5) MyClient.EXE does not end up with Windows Focus.
>
>While Destroying Myserver.exe I call BringWindowToTop
>Once Destroyed MYClient.EXE tries callilng BringWindowToTop
>
>In development mode the code has no problem finding MyClient and giving it focus. This only happens in EXE's.
>
>How do I get focus back to MyClient.EXE?

Terry,
I am not sure why you are seeing this. On first glance, BringWindowToTop and SetForegroundWindow seem to do similar things. However, I have never used BringWindowToTop so I have no direct experience with it. You could try SetForegroundWindow instead and see if the results are teh same.

HTH.
Larry Miller
MCSD
LWMiller3@verizon.net

Accumulate learning by study, understand what you learn by questioning. -- Mingjiao
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform