home *** CD-ROM | disk | FTP | other *** search
/ DOS/V Power Report 1997 May / VPR9705A.ISO / VPR_DATA / PROGRAM / CBTRIAL / SETUP / DATA.Z / PICKDATE.CPP < prev    next >
C/C++ Source or Header  |  1997-02-14  |  2KB  |  45 lines

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