Hi,

Use the JclAppInst unit from the JEDI library, in the dpr file just add two
lines of code, the job will be done.

program MidServer;

uses
  JclAppInst,  //line one

begin
  // Do not allow another instance to run
  JclAppInstances.CheckSingleInstance; //line two


Monir

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf
Of Rainer von Saleski
Sent: Sunday, September 23, 2007 10:14 PM
To: [email protected]
Subject: Preventing Multiple Simultaneous Executions

What's the best (easiest effective) way to prevent multiple copies of a
single Delphi program from attemtping to execute simultaneously?

The problem is that  users are double clicking to launch the program (when
Control Panel is configured for  single clicks), and then when things aren't
happening fast enough, they click twice again, and again, and again, until
there are 12 or more copies of the program trying to launch ... and none of
them are getting off the ground.  My users don't seem able to learn
patience, so I need to help them out.

Any ideas?

Thanks,
Rainer
 
_______________________________________________
Delphi mailing list -> [email protected]
http://www.elists.org/mailman/listinfo/delphi

_______________________________________________
Delphi mailing list -> [email protected]
http://www.elists.org/mailman/listinfo/delphi

Reply via email to