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

  1. //---------------------------------------------------------------------------
  2. #include <vcl\vcl.h>
  3. #pragma hdrstop
  4.  
  5. #include "Main.h"
  6. #include "About.h"
  7. #include "Report.h"
  8. #include "FileCtrl.hpp"
  9. //---------------------------------------------------------------------------
  10. #pragma resource "*.dfm"
  11. TMainForm *MainForm;
  12. //---------------------------------------------------------------------------
  13. __fastcall TMainForm::TMainForm(TComponent* Owner)
  14.     : TForm(Owner)
  15. {
  16.   TargetsTable->Active = true;
  17. }
  18. //----------------------------------------------------------------------------
  19. void __fastcall TMainForm::ExitActionExecute(TObject *Sender)
  20. {
  21.   Close();
  22. }
  23. //---------------------------------------------------------------------------
  24. void __fastcall TMainForm::AboutActionExecute(TObject *Sender)
  25. {
  26.   AboutBox->ShowModal ();
  27. }
  28. //---------------------------------------------------------------------------
  29. void __fastcall TMainForm::LoadActionExecute(TObject *Sender)
  30. {
  31.   if (LoadDialog->Execute ())
  32.   {
  33.     LogoImage->Picture->LoadFromFile (LoadDialog->FileName);
  34.   }
  35. }
  36. //---------------------------------------------------------------------------
  37. void __fastcall TMainForm::ClearActionExecute(TObject *Sender)
  38. {
  39.   LogoImage->Picture->Assign (NULL);
  40. }
  41. //---------------------------------------------------------------------------
  42. void __fastcall TMainForm::PrintSetupActionExecute(TObject *Sender)
  43. {
  44.   RepForm->VividReport->PrinterSetup ();
  45. }
  46. //---------------------------------------------------------------------------
  47. void __fastcall TMainForm::PrintActionExecute(TObject *Sender)
  48. {
  49.   if (RepForm->VividReport->PrintSetup ())
  50.   {
  51.     RepForm->VividReport->Print ();
  52.   }
  53. }
  54. //---------------------------------------------------------------------------
  55. void __fastcall TMainForm::PrintPreviewActionExecute(TObject *Sender)
  56. {
  57.   RepForm->VividReport->PrintPreview (RepForm->VRPreview);
  58. }
  59. //---------------------------------------------------------------------------
  60.  
  61.  
  62.