
(*
 Delphi Object and Component Reference
# {bmc bm10.BMP} OnHide example
This cross-platform example uses two forms, each with a label and a button. When the user clicks a button, the other form appears and the current form disappears. Also, a message appears in the label of the form that is showing, indicating that the other form is hidden. This is the implementation section of Unit1:
*) 
implementation
{$R *.xfm}
uses Unit2;
procedure TForm1.Button1Click(Sender: TObject);
begin
  Form2.Show;
  Hide;
end;
procedure TForm1.FormHide(Sender: TObject);
begin
  Form2.Label1.Caption := 'Form1 is hiding';
end;
end.

This is the implementation section of Unit2:
*) 
implementation
{$R *.xfm}
uses Unit1;
procedure TForm2.Button1Click(Sender: TObject);
begin
  Form1.Show;
  Hide;
end;
procedure TForm2.FormHide(Sender: TObject);
begin
  Form1.Label1.Caption := 'Form2 is hiding';
end;
end. 
