/*
Time, TimeToStr example
This procedure displays the current time in the form's caption every time the Timer's OnClick event fires, based upon the Interval Property (default: 1000 = 1 sec)
*/ 
void __fastcall TForm1::Timer1Timer(TObject *Sender)
{
  TDateTime DateTime = Time();  // store the current date and time
  AnsiString str = TimeToStr(DateTime); // convert the time to a string
  Caption = str;  // display the time on the form's caption
  // Note This could have been done with the following line of code:
  //  Caption = TimeToStr(Time());
} 
