unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, gr32, ExtCtrls;
type
TForm1 =
class(TForm)
Image1: TImage;
procedure FormCreate(Sender: TObject);
procedure FormDestroy(Sender: TObject);
procedure FormPaint(Sender: TObject);
private
{ Private-Deklarationen }
bmp32: Tbitmap32;
public
{ Public-Deklarationen }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.FormCreate(Sender: TObject);
begin
bmp32 := Tbitmap32.Create;
bmp32.SetSize(self.ClientWidth, self.ClientHeight);
bmp32.Canvas.Brush.Bitmap := image1.Picture.Bitmap;
bmp32.Canvas.FillRect(bmp32.ClipRect);
end;
procedure TForm1.FormDestroy(Sender: TObject);
begin
bmp32.Free;
end;
procedure TForm1.FormPaint(Sender: TObject);
begin
bmp32.DrawTo(Canvas.handle, 0,0);
end;
end.