home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 1997 May / Pcwk0597.iso / delphi / imagelib / u_p_size.pa_ / u_p_size.pa
Text File  |  1995-08-31  |  3KB  |  104 lines

  1. {Part of Imagelib VCL/DLL Library.
  2. Written by Jan Dekkers and Kevin Adams (c) 1995. If you are a non
  3. registered client, you may use or alter this demo only for evaluation
  4. purposes.
  5.  
  6. Uses ImageLib 2.2.1 Changed the callback to a function instead of a
  7. procedure to let the user cancel out. Added:
  8.  
  9. Changed callback in version 2.21 to a function with cdecl.
  10. using the C calling convention.
  11.  
  12. scrolling text images
  13. Cut, Copy and Paste to/from the clipboard
  14. Printing bitmaps}
  15.  
  16. unit U_p_size;
  17.  
  18. interface
  19.  
  20. uses WinTypes, WinProcs, Classes, Graphics, Forms, Controls, Buttons,
  21.   StdCtrls, ExtCtrls, Spin;
  22.  
  23. type
  24.   TPrintersize = class(TForm)
  25.     OKBtn: TBitBtn;
  26.     Bevel1: TBevel;
  27.     WidthSpinEdit: TSpinEdit;
  28.     HeigthSpinEdit: TSpinEdit;
  29.     Label1: TLabel;
  30.     Label2: TLabel;
  31.     Label3: TLabel;
  32.     GroupBox1: TGroupBox;
  33.     RadioButton1: TRadioButton;
  34.     RadioButton2: TRadioButton;
  35.     RadioButton3: TRadioButton;
  36.     RadioButton4: TRadioButton;
  37.     RadioButton5: TRadioButton;
  38.     RadioButton6: TRadioButton;
  39.     procedure FormActivate(Sender: TObject);
  40.     procedure RadioButton1Click(Sender: TObject);
  41.     procedure RadioButton2Click(Sender: TObject);
  42.     procedure RadioButton3Click(Sender: TObject);
  43.     procedure RadioButton4Click(Sender: TObject);
  44.     procedure RadioButton5Click(Sender: TObject);
  45.     procedure RadioButton6Click(Sender: TObject);
  46.   private
  47.     { Private declarations }
  48.     bwt, bht : integer;
  49.   public
  50.     { Public declarations }
  51.   end;
  52.  
  53. var
  54.   Printersize: TPrintersize;
  55.  
  56. implementation
  57.  
  58. {$R *.DFM}
  59.  
  60. procedure TPrintersize.FormActivate(Sender: TObject);
  61. begin
  62.  bwt:= WidthSpinEdit.Value;
  63.  bht:=HeigthSpinEdit.Value;
  64. end;
  65.  
  66.  
  67. procedure TPrintersize.RadioButton1Click(Sender: TObject);
  68. begin
  69.  HeigthSpinEdit.Value:=bht;
  70.  WidthSpinEdit.Value:=bwt;
  71. end;
  72.  
  73. procedure TPrintersize.RadioButton2Click(Sender: TObject);
  74. begin
  75.  HeigthSpinEdit.Value:=bht*2;
  76.  WidthSpinEdit.Value:=bwt*2;
  77. end;
  78.  
  79. procedure TPrintersize.RadioButton3Click(Sender: TObject);
  80. begin
  81.  HeigthSpinEdit.Value:=bht*3;
  82.  WidthSpinEdit.Value:=bwt*3;
  83. end;
  84.  
  85. procedure TPrintersize.RadioButton4Click(Sender: TObject);
  86. begin
  87.  HeigthSpinEdit.Value:=bht*4;
  88.  WidthSpinEdit.Value:=bwt*4;
  89. end;
  90.  
  91. procedure TPrintersize.RadioButton5Click(Sender: TObject);
  92. begin
  93.  HeigthSpinEdit.Value:=bht*5;
  94.  WidthSpinEdit.Value:=bwt*5;
  95. end;
  96.  
  97. procedure TPrintersize.RadioButton6Click(Sender: TObject);
  98. begin
  99.  HeigthSpinEdit.Value:=bht*6;
  100.  WidthSpinEdit.Value:=bwt*6;
  101. end;
  102.  
  103. end.
  104.