home *** CD-ROM | disk | FTP | other *** search
/ Chip 2004 February / Chip_2004-02_cd1.bin / program / delphi / navody / d56 / ec1vr2.exe / #setuppath# / CB6 / 2DTable / Main.cpp < prev    next >
Encoding:
C/C++ Source or Header  |  2003-12-09  |  1.5 KB  |  45 lines

  1. //---------------------------------------------------------------------------
  2. #include <vcl\vcl.h>
  3. #pragma hdrstop
  4.  
  5. #include "Main.h"
  6. #include "dm.h"
  7. #include "About.h"
  8. #include "Report.h"
  9. //---------------------------------------------------------------------------
  10. #pragma link "VRPROGR"
  11. #pragma resource "*.dfm"
  12. TMainForm *MainForm;
  13. //---------------------------------------------------------------------------
  14. __fastcall TMainForm::TMainForm(TComponent* Owner)
  15.     : TForm(Owner)
  16. {
  17. }
  18. //----------------------------------------------------------------------------
  19. void __fastcall TMainForm::PrintSetup(TObject *Sender)
  20. {
  21.   RepForm->VividReport->PrinterSetup ();
  22. }
  23. //----------------------------------------------------------------------------
  24. void __fastcall TMainForm::Exit(TObject *Sender)
  25. {
  26.   Close();
  27. }
  28. //----------------------------------------------------------------------------
  29. void __fastcall TMainForm::About(TObject *Sender)
  30. {
  31.   AboutBox->ShowModal ();
  32. }
  33. //---------------------------------------------------------------------------
  34. void __fastcall TMainForm::PrintItemClick(TObject *Sender)
  35. {
  36.   if (RepForm->VividReport->PrintSetup ()) RepForm->VividReport->Print (); 
  37. }
  38. //---------------------------------------------------------------------------
  39. void __fastcall TMainForm::PrintPreviewItemClick(TObject *Sender)
  40. {
  41.   RepForm->VividReport->PrintPreview (VRPreview);
  42. }
  43. //---------------------------------------------------------------------------
  44.  
  45.