//---------------------------------------------------------------------------

#include <vcl.h>
#pragma hdrstop

// BeginExample: TFormOnHide2
// Event: Forms.TCustomForm.OnHide

// BeginCode
/*
This is the implementation of Unit2:
*/
#include "Unit2.h"
#include "TFormOnHide.h"  // We must include unit1’s header file too!

#pragma package(smart_init)
#pragma resource "*.dfm"
TForm2 *Form2;

__fastcall TForm2::TForm2(TComponent* Owner)
	: TForm(Owner)
{
}

void __fastcall TForm2::Button1Click(TObject *Sender)
{
  Form1->Show();
  Hide();
}

void __fastcall TForm2::FormHide(TObject *Sender)
{
  Form1->Label1->Caption = "Form2 is hiding";
}
// EndCode
// EndExample: TFormOnHide2
//---------------------------------------------------------------------------
