home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 1997 May / Pcwk0597.iso / delphi / cbsuite.lzh / SU1SRC.ZIP / FDEMO19.PAS < prev    next >
Pascal/Delphi Source File  |  1996-11-24  |  3KB  |  114 lines

  1. unit Fdemo19;
  2.  
  3. interface
  4.  
  5. uses WinTypes, WinProcs, Classes, Graphics, Forms, Controls, Buttons,
  6.   StdCtrls, ExtCtrls, PrnWin, DBCtrls, DBPrnWin, CB_MFunc;
  7.  
  8. type
  9.   TForm19 = class(TForm)
  10.     CancelBtn: TBitBtn;
  11.     Panel1: TPanel;
  12.     CheckBox1: TCheckBox;
  13.     CheckBox2: TCheckBox;
  14.     CheckBox3: TCheckBox;
  15.     CheckBox4: TCheckBox;
  16.     RadioButton1: TRadioButton;
  17.     RadioGroup1: TRadioGroup;
  18.     RadioButton2: TRadioButton;
  19.     RadioButton3: TRadioButton;
  20.     RadioButton4: TRadioButton;
  21.     Panel2: TPanel;
  22.     RadioGroup2: TRadioGroup;
  23.     RadioButton5: TRadioButton;
  24.     RadioButton6: TRadioButton;
  25.     RadioButton7: TRadioButton;
  26.     DBRadioGroup1: TDBRadioGroup;
  27.     DBCheckBox1: TDBCheckBox;
  28.     DBCheckBox2: TDBCheckBox;
  29.     Panel3: TPanel;
  30.     DBRadioGroup2: TDBRadioGroup;
  31.     DBCheckBox3: TDBCheckBox;
  32.     DBCheckBox4: TDBCheckBox;
  33.     Button1: TButton;
  34.     Label1: TLabel;
  35.     Label2: TLabel;
  36.     Label3: TLabel;
  37.     Button2: TButton;
  38.     Button3: TButton;
  39.     Button4: TButton;
  40.     Button5: TButton;
  41.     Button6: TButton;
  42.     Memo1: TMemo;
  43.     Memo2: TMemo;
  44.     DBPrintWin1: TDBPrintWin;
  45.     procedure Button1Click(Sender: TObject);
  46.     procedure Button2Click(Sender: TObject);
  47.     procedure Button3Click(Sender: TObject);
  48.     procedure Button6Click(Sender: TObject);
  49.     procedure Button4Click(Sender: TObject);
  50.     procedure Button5Click(Sender: TObject);
  51.   private
  52.     { Private declarations }
  53.   public
  54.     { Public declarations }
  55.   end;
  56.  
  57. var
  58.   Form19: TForm19;
  59.  
  60. implementation
  61.  
  62. {$R *.DFM}
  63.  
  64.  
  65. procedure TForm19.Button1Click(Sender: TObject);
  66. begin
  67. DBPrintWin1.BeginPrint;
  68. DBPrintWin1.DrawWindowAt(1,1,Panel1);
  69. DBPrintWin1.EndPrint;
  70. end;
  71.  
  72. procedure TForm19.Button2Click(Sender: TObject);
  73. begin
  74. DBPrintWin1.BeginPrint;
  75. DBPrintWin1.DrawWindowAt(1,1,Panel2);
  76. DBPrintWin1.EndPrint;
  77. end;
  78.  
  79. procedure TForm19.Button3Click(Sender: TObject);
  80. begin
  81. DBPrintWin1.BeginPrint;
  82. DBPrintWin1.DrawWindowAt(1,1,Panel3);
  83. DBPrintWin1.EndPrint;
  84. end;
  85.  
  86. procedure TForm19.Button6Click(Sender: TObject);
  87. begin
  88. DBPrintWin1.BeginPrint;
  89. DBPrintWin1.DrawWindowAt(1,1,Form19);
  90. DBPrintWin1.EndPrint;
  91. end;
  92.  
  93. procedure TForm19.Button4Click(Sender: TObject);
  94. begin
  95. DBPrintWin1.BeginPrint;
  96. DBPrintWin1.DrawWindowAt(1,1,DBRadioGroup1);
  97. Memo1.Visible := True;
  98. DBPrintWin1.DrawWindowAt(1,3,Memo1);
  99. Memo1.Visible := False;
  100. DBPrintWin1.EndPrint;
  101. end;
  102.  
  103. procedure TForm19.Button5Click(Sender: TObject);
  104. begin
  105. DBPrintWin1.BeginPrint;
  106. DBPrintWin1.DrawWindowAt(1,1,RadioGroup1);
  107. Memo2.Visible := True;
  108. DBPrintWin1.DrawWindowAt(1,3,Memo2);
  109. Memo2.Visible := False;
  110. DBPrintWin1.EndPrint;
  111. end;
  112.  
  113. end.
  114.