|
-
May 28th, 1999, 06:28 AM
#1
How to have only one instance of a program running
I have a system-tray application. How to prevent it to appear many times in the system tray, in other words, if the program is already running and user starts it again from the Start menu how to stop it to inserting another icon in the system tray?
Many thanks for all/any responses.
-
May 28th, 1999, 08:20 AM
#2
Re: How to have only one instance of a program running
There are many different ways to make sure there is only one instance of a program. The most simple one is to call FindWindow(). Another one is CreateMutex(). Mutex is a kind of system-global object. Once you create and name it, it is up there until you close your process' or mutex's itself handle.
Good luck!
Leonid Sysoev
-
May 28th, 1999, 08:49 AM
#3
Re: How to have only one instance of a program running
Thanks Leonid, that saved me lot of time!
Mr Ode
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|