home *** CD-ROM | disk | FTP | other *** search
/ Chip 2004 February / Chip_2004-02_cd1.bin / program / delphi / navody / d56 / ec1vr2.exe / #setuppath# / CB5 / 2DTable / Main.cpp < prev    next >
Encoding:
C/C++ Source or Header  |  2003-12-09  |  1.4 KB  |  44 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 resource "*.dfm"
  11. TMainForm *MainForm;
  12. //---------------------------------------------------------------------------
  13. __fastcall TMainForm::TMainForm(TComponent* Owner)
  14.     : TForm(Owner)
  15. {
  16. }
  17. //----------------------------------------------------------------------------
  18. void __fastcall TMainForm::PrintSetup(TObject *Sender)
  19. {
  20.   RepForm->VividReport->PrinterSetup ();
  21. }
  22. //----------------------------------------------------------------------------
  23. void __fastcall TMainForm::Exit(TObject *Sender)
  24. {
  25.   Close();
  26. }
  27. //----------------------------------------------------------------------------
  28. void __fastcall TMainForm::About(TObject *Sender)
  29. {
  30.   AboutBox->ShowModal ();
  31. }
  32. //---------------------------------------------------------------------------
  33. void __fastcall TMainForm::PrintItemClick(TObject *Sender)
  34. {
  35.   if (RepForm->VividReport->PrintSetup ()) RepForm->VividReport->Print (); 
  36. }
  37. //---------------------------------------------------------------------------
  38. void __fastcall TMainForm::PrintPreviewItemClick(TObject *Sender)
  39. {
  40.   RepForm->VividReport->PrintPreview (VRPreview);
  41. }
  42. //---------------------------------------------------------------------------
  43.  
  44.