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

#include <vcl.h>
#pragma hdrstop

#include "ActiveControl.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
TForm1 *Form1;
//---------------------------------------------------------------------------
__fastcall TForm1::TForm1(TComponent* Owner)
	: TForm(Owner)
{
}
//---------------------------------------------------------------------------
// BeginExample: ActiveControl
// Property: Forms.TCustomForm.ActiveControl
// Event: ExtCtrls.TTimer.OnTimer
// Property: ExtCtrls.TTimer.Interval
// Property: Controls.TControl.Left

// BeginCode
/*
Place a TTimer object in the form and enter Timer1Timer in 
the OnTimer event.  Place other controls in the form and 
change the active control at runtime.  The following event 
handler responds to timer events by moving the active control
one pixel to the right every 100 miliseconds:
*/
void __fastcall TForm1::Timer1Timer(TObject *Sender)
{
  Timer1->Interval = 100;
  if (ActiveControl)
    ActiveControl->Left = ActiveControl->Left + 1;
}
// EndCode
// EndExample: ActiveControl
//---------------------------------------------------------------------------
