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

#include <vcl.h>
#pragma hdrstop

#include "BringToFront.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
TForm1 *Form1;
//---------------------------------------------------------------------------
__fastcall TForm1::TForm1(TComponent* Owner)
	: TForm(Owner)
{
}
//---------------------------------------------------------------------------
// BeginExample: BringToFront
// Property: Forms.TCustomForm.Visible
// Method: Controls.TControl.BringToFront

// BeginCode
/*
The following code uses two forms. Form1 has a button on it. The
second form is used as a tool palette. This code makes the palette
form visible, and ensures it is the top form by bringing it to the
front.  To run this example, you must include Unit2.h in this
module.
*/
#include "Unit2.h"

void __fastcall TForm1::ShowPaletteButtonClick(TObject *Sender)
{
  if (!Form2->Visible)
  {
    Form2->Visible = true;
    Form2->BringToFront();
  }
}
// EndCode
// EndExample: BringToFront
//---------------------------------------------------------------------------
