PC Review


Reply
Thread Tools Rate Thread

Click program icon twice

 
 
=?Utf-8?B?ZHJ1bXJlZA==?=
Guest
Posts: n/a
 
      11th Mar 2007
I have noticed that if I click my program icon twice quickly that two
instances of the program are started.

If I click once, normally, the program loads once. Once loaded a second
instance can not be started. How can I prevent double clicking from loading
twice?
 
Reply With Quote
 
 
 
 
Nino Benvenuti
Guest
Posts: n/a
 
      11th Mar 2007
Create a mutex on startup. When the second instance starts, the mutex will
already exist, so you can exit silently. This has been discussed a bit
already:

http://groups.google.com/group/micro...rch+this+group

You can either P/Invoke, or leverage OpenNETCF to get a mutex.

--
Nino Benvenuti
Device Application Development MVP
http://nino.net/blog


"drumred" <(E-Mail Removed)> wrote in message
news:C0BB6848-2273-44F6-A10F-(E-Mail Removed)...
>I have noticed that if I click my program icon twice quickly that two
> instances of the program are started.
>
> If I click once, normally, the program loads once. Once loaded a second
> instance can not be started. How can I prevent double clicking from
> loading
> twice?


 
Reply With Quote
 
=?Utf-8?B?ZHJ1bXJlZA==?=
Guest
Posts: n/a
 
      12th Mar 2007
I'd read about solution a while back but couldn't find info when I was trying
differing searches. Thanks for responding.

Kent Layher

"Nino Benvenuti" wrote:

> Create a mutex on startup. When the second instance starts, the mutex will
> already exist, so you can exit silently. This has been discussed a bit
> already:
>
> http://groups.google.com/group/micro...rch+this+group
>
> You can either P/Invoke, or leverage OpenNETCF to get a mutex.
>
> --
> Nino Benvenuti
> Device Application Development MVP
> http://nino.net/blog
>
>
> "drumred" <(E-Mail Removed)> wrote in message
> news:C0BB6848-2273-44F6-A10F-(E-Mail Removed)...
> >I have noticed that if I click my program icon twice quickly that two
> > instances of the program are started.
> >
> > If I click once, normally, the program loads once. Once loaded a second
> > instance can not be started. How can I prevent double clicking from
> > loading
> > twice?

>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problems getting into the Word program as no icon to click. Sue Eely Microsoft Word New Users 1 1st Jul 2008 04:37 PM
Click ICON, System Program won't start Larry H. Windows XP General 2 15th Apr 2004 05:55 AM
Click icon and no program SAC Microsoft Windows 2000 0 24th Feb 2004 11:28 PM
Right click on program icon does not show menu =?Utf-8?B?UmVlZA==?= Windows XP Help 1 14th Jan 2004 06:16 AM
Rare Problem: Click Program ICON and Nothing Happens? Brad Isaac Microsoft Dot NET Compact Framework 4 1st Aug 2003 04:36 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:33 AM.