Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
EXE to COMEXE back to EXE
Message
From
06/12/2001 11:48:25
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Title:
EXE to COMEXE back to EXE
Miscellaneous
Thread ID:
00590598
Message ID:
00590598
Views:
61
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 Rooks
Software Systems Architect
Microsoft Certified Solution Developer.Net

If at first you don't succeed, then skydiving definitely isn't for you.
Next
Reply
Map
View

Click here to load this message in the networking platform