home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 2001 December
/
Chip_2001-12_cd1.bin
/
zkuste
/
delphi
/
kompon
/
d23456
/
CAJSCRTP.ZIP
/
demo_kylix
/
demo2.pas
< prev
next >
Wrap
Pascal/Delphi Source File
|
2001-05-20
|
829b
|
46 lines
unit demo2;
interface
uses
SysUtils, Types, Classes, Variants, QGraphics, QControls, QForms, QDialogs,
QExtCtrls;
type
TPaintForm = class(TForm)
PaintBox1: TPaintBox;
procedure FormCreate(Sender: TObject);
procedure FormDestroy(Sender: TObject);
procedure PaintBox1Paint(Sender: TObject);
private
{ Private declarations }
public
Bitmap: TBitmap;
procedure DoUpdate;
end;
var
PaintForm: TPaintForm;
implementation
{$R *.dfm}
procedure TPaintForm.DoUpdate;
begin
PaintBox1.Repaint;
end;
procedure TPaintForm.FormCreate(Sender: TObject);
begin
Bitmap := TBitmap.Create;
end;
procedure TPaintForm.FormDestroy(Sender: TObject);
begin
Bitmap.Free;
end;
procedure TPaintForm.PaintBox1Paint(Sender: TObject);
begin
Canvas.Draw(0, 0, Bitmap);
end;
end.