I'd suggest to try any of these:

1) Instead on FormClose try to post a message as the last thing in
OnFormDestroy
2) Make sure you do use PostMEssage not SendMessage
3) Instead of ShellExecute try to use CreateProcess (with properly released
process and thread handles immidiately after loading the application)

Alex


----- Original Message -----
From: "Mark Derricutt" <[EMAIL PROTECTED]>
To: "Multiple recipients of list delphi" <[EMAIL PROTECTED]>
Sent: Friday, 1 December 2000 19:07
Subject: [DUG]: Dissapearing app...


> Hi, got an odd question for you all....
>
> I have a project with 2 executables, one runs as a screensaver.
>
> When the screensaver ends, I start the other application with
> ShellExecute() and it comes up fine, when that application quits, I send a
> message via PostMessage() to the desktop with a message to redisplay the
> current screensaver (app 1), this is in the FormClose event, all seems
> fine, however, when the screensaver quits the next time and runs app 2, it
> doesn't display, initially I thought it wasn't running but it's there in
> the task list, just not on screen and or in the taskbar.  Any ideas?
>
> --------------------------------------------------------------------------
-
>     New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
>                   Website: http://www.delphi.org.nz
> To UnSub, send email to: [EMAIL PROTECTED]
> with body of "unsubscribe delphi"
>

---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED] 
with body of "unsubscribe delphi"

Reply via email to