![]() |
![]() ![]() ![]() |
acAppEvents component.
|
property IsWindowsShutdown: Boolean; // read-only!
|
The IsWindowsShutdown property determines whether Windows is about to be shutdowned or restarted. You can use this property in some particular situations to determinate whether Windows is about to be shutdown and take some specific actions in this case (for example, see below how we can prevent to show the exit confirmation dialog in OnCloseQuery event handler of main form).
|
procedure TMainForm.FormCloseQuery(Sender: TObject; var CanClose: Boolean);
|
begin
|
// this will prevent to show the confirmation dialog on Windows exit
|
if not acAppEvents1.IsWindowsShutdown then
|
CanClose := ShowInfoBox('Are you sure want to close this application?', 'Confirm Exit', 0, ibYesNo) <> ID_NO;
|
end;
|
OnWindowsShutdown event.
|