home *** CD-ROM | disk | FTP | other *** search
/ Chip 1997 April / Chip_1997-04_cd.bin / prezent / cb / data.z / PICKDATE.CPP < prev    next >
C/C++ Source or Header  |  1997-01-16  |  1KB  |  41 lines

  1. //---------------------------------------------------------------------------
  2. #include <vcl\vcl.h>
  3. #pragma hdrstop
  4.  
  5. #include "pickdate.h"
  6. //---------------------------------------------------------------------------
  7. #pragma link "calendar"
  8. #pragma resource "*.dfm"
  9. TBrDateForm *BrDateForm;
  10. //---------------------------------------------------------------------------
  11. __fastcall TBrDateForm::TBrDateForm(TComponent* Owner)
  12.     : TForm(Owner)
  13. {
  14. }
  15. //---------------------------------------------------------------------------
  16. void TBrDateForm::SetDate(TDateTime Date)
  17. {
  18.   Calendar1->CalendarDate = Date;
  19. }
  20. //---------------------------------------------------------------------------
  21. TDateTime TBrDateForm::GetDate()
  22. {
  23.   TDateTime Date = Calendar1->CalendarDate;
  24.   return Date;
  25. }//---------------------------------------------------------------------------
  26. void __fastcall TBrDateForm::PrevMonthBtnClick(TObject *Sender)
  27. {
  28.   Calendar1->PrevMonth();
  29. }
  30. //---------------------------------------------------------------------------
  31. void __fastcall TBrDateForm::NextMonthBtnClick(TObject *Sender)
  32. {
  33.   Calendar1->NextMonth();
  34. }
  35. //---------------------------------------------------------------------------
  36. void __fastcall TBrDateForm::Calendar1Change(TObject *Sender)
  37. {
  38.    TitleLabel->Caption = FormatDateTime("MMMM, YYYY", Calendar1->CalendarDate);
  39. }
  40. //---------------------------------------------------------------------------
  41.