> procedure TForm1.FormCloseQuery(Sender: TObject; var CanClose: Boolean);
> begin
>   // Ask user if shutdown should occur.
>   if (wm_close or WM_ENDSESSION) and (MessageDlg('Are you sure?',
> mtConfirmation, mbYesNoCancel, 0) = mrYes)
>   then CanClose := true    // Allow Windows to shut down.
>   else CanClose := false;  // Prevent Windows from shutting down.
> end;

Wow!


---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz

Reply via email to