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

#include <vcl.h>
#pragma hdrstop

#include "ProgressBarPosition.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
TForm1 *Form1;
//---------------------------------------------------------------------------
__fastcall TForm1::TForm1(TComponent* Owner)
	: TForm(Owner)
{
}
//---------------------------------------------------------------------------
// BeginExample: ProgressBarPosition
// Property: ComCtrls.TProgressBar.Min
// Property: ComCtrls.TProgressBar.Max
// Property: ComCtrls.TProgressBar.Position

// BeginCode
/*
This example requires two ProgressBars, two labels and a
Memo.  The ProgressBar and the label captions are updated as
the mouse moves inside the Memo.
*/
void __fastcall TForm1::FormCreate(TObject *Sender)
{
  ProgressBar1->Min = 0;
  ProgressBar1->Max = Memo1->Width;
  ProgressBar2->Min = 0;
  ProgressBar1->Max = Memo1->Height;

}

void __fastcall TForm1::Memo1MouseMove(TObject *Sender, TShiftState Shift,
      int X, int Y)
{
  Label1->Caption = IntToStr(X);
  Label2->Caption = IntToStr(Y);
  ProgressBar1->Position = X;
  ProgressBar2->Position = Y;
}
// EndCode
// EndExample: ProgressBarPosition
//---------------------------------------------------------------------------
