RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TApplicationEvents.OnRestore Event

Occurs when the previously minimized application is restored to its normal size.

Pascal
property OnRestore: TNotifyEvent;
C++
__property TNotifyEvent OnRestore;

Write an OnRestore event handler to perform special processing when the application is restored from the minimized state in which it appears as an icon. An application is restored either because the user restores the application, or because the application calls the Restore method.

Note: Don't confuse restoring an application with restoring a form or window to its original size. To minimize, maximize, and restore a window or form, change the value of the WindowState property.
Note: Call the CancelDispatch method from an OnRestore event handler to prevent the application from forwarding the event to any other application events objects.
 

C++ Examples: 

 

/*
This example requires a TApplicationEvents and a TListBox
in the form.  Select the TApplicationEvents, double click
on the OnRestore event and add the following code to the
handler.  OnRestore is triggered when a minimized
application is restored.
*/
void __fastcall TAppEventForm::ApplicationEventsRestore(TObject *Sender)
{

  lbOther->Items->Add("Event OnRestore");
}

 

Delphi Examples: 

{
This example requires a TApplicationEvents and a TListBox
in the form.  Select the TApplicationEvents, double click
on the OnRestore event and add the following code to the
handler.  OnRestore is triggered when a minimized
application is restored.
}
procedure TMainForm.ApplicationEventsRestore(Sender: TObject);
begin
  lbOther.Items.Add('Event OnRestore');
end;

 

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!