Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Difficulty Using OneInstance.VCX
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00132124
Message ID:
00132186
Views:
15
I have a better solution (not so much better, but it doesn't require any external variable or #define). I will send it to Michel as soon as he comes back.

I forgot to say it in my previous message: the method is based on DDE. The first instance opens a DDE channel and the second instance will try to use it. If it finds the channel, it means there's already one instance running. So, no _SCREEN, window titles, etc. As far as I know, this is the most reliable solution for having only one instance.

Vlad

>Okay, I fixed my problem, and I suppose you can set up your class to do the same thing. My apps use an include file and I set a DEFINEd constant called _APPNAME, which is the name of the application. After replacing all cases of "DDEMyAppIsOpen" with "_APPNAME" (no quotes for the constant), it works great for multiple FoxPro applications.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform