Newsgroups : Borland : borland.public.delphi.nativeapi.win32 : 2005 Jul : Close/restart -one instance only

www.cryer.info
Managed Newsgroup Archive

Close/restart -one instance only

Subject:Close/restart -one instance only
Posted by:"vmars" (..@verizon.net)
Date:Sun, 24 Jul 2005 19:18:38 -1000

Thanks in advance!
I want to add a ReStart capability to pgm1.
But i want to make sure pgm1 is shutdown,
before starting it up again.

I was thinking of handling it this way:
When ShutDown button is clicked , startup pgm2,
then shutdown pgm1.

Pgm2, checks for (   AppHandle:=FindWindow) pgm1:
If pgm1 exists, wait 5 secs,
then show message with 'tryAgain' or 'Cancel'.
If pgm1 not running, then Start pgm1,
Close pgm2.

In addition, how do i set in the Registry 'One Instance Only',
so someone doesn't accidently startup pgm1,
while it is currently running..

Thanks some more!
--
τΏτ
V e r n  www.parentpresent.org
NoWorrys = KidSafe Internet Filter (Freeware)

Glossary

Replies:

www.cryer.info
Managed Newsgroup Archive