/*
OnActiveFormChange, ActiveForm example
This cross-platform example uses a two forms with a button on the first form. When the user clicks the button, the second form appears. As the user switches between forms, the form that is active is colored aqua.
Note:	you must include the unit header for form 2 to the unit file for form 1, and add the public ColorForm method to the header for form 1’s unit.
*/
void __fastcall TForm1::ColorForm(TObject *Sender)
{
  Color = clWhite;
  Form2->Color = clWhite;
  Screen->ActiveForm->Color = clAqua;
}
void __fastcall TForm1::FormCreate(TObject *Sender)
{
  Screen->OnActiveFormChange = ColorForm;
}
void __fastcall TForm1::Button1Click(TObject *Sender)
{
  Form2->Show();
} 
