The problem is a can't figure out how to intercept the windows shutdown.
Any help most appreciated. I
am using D2.
Gary Freestone
Gary Freestone <ga...@au1.ibm.com.REMOVETOREPLY> wrote in message
news:37DC5D0F...@au1.ibm.com.REMOVETOREPLY...
Add an event handler for the WM_ENDSESSION message to your form.
Regards,
Jan.
--
http://www.jgsoft.com/helpscr.shtml
In the April 1999 issue, Delphi Informant readers selected HelpScribble
as the "Best Help Authoring Package", leaving well-known commercial
packages as RoboHelp and ForeHelp (which were also nominated) behind it.
Thanks for your help, you pointed me in the right direction. Just in case
people are interested.....
The following example works:
Where Form1 is the main form and the event is OnCloseQuery.
procedure TForm1.FormCloseQuery(Sender: TObject; var CanClose: Boolean);
begin
if MessageDlg('Close the form and Shut down Windows ?', mtConfirmation,
[mbYes, mbNo], 0) = mrNo then CanClose := False;
end;
Once again Thanks for your help.
Gary Freestone
>Can't you just override the WM_CLOSE message? Windows will close your
>program down before it shuts itself down.
>
Is better use the WM_QUERYENSESSION message
An example of this in Trucomania, tip
[31] Avoid that the user closes Windows
www.q3.nu/trucomania/truco.cgi?31&ing
Un Saludo:
Radikal
www.q3.nu/trucomania