Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to detect if your program is already running before
Message
From
22/06/2001 08:26:39
 
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00522073
Message ID:
00522348
Views:
10
>>Hello Group,
>>
>>We have a user who keeps starting the filetrac program and watching to see its old icon in the tray. This isn't going to happen until I learn how to make the new filetrac program put the old filetrac icon in the tray.
>>
>Jim,
>
>Do you mean preventing a second instance of the application running? Are you talking about the taskbar or the System Tray?
>
>If you mean preventing a normal executable from running twice, there are a number of ways. Use the FindWindow() API call or something like my Is_Run32 program from the download section to determine if the window already exists. You could set up the application as a DDE server and test to see if it's active. Ed Rauh suggests using the CreateEvent() API call. I think if you'll check the FAQs you'll find that. I wrote an article for FoxPro Advisor (Nov., 1998) that uses CreateMutex().
>
>Some of this (inlcuding the DDE implementation) you can find in the FAQs or download sections.
Hi George,

Yep I meant the systray, had to take a minute to figure which one was which.

I would like to prevent a normal executable from running twice.

Thank you for your help

Best regards
Jim
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform