unit Unit1;
interface
uses
Windows, Forms, GIFImage, Classes, Controls, ExtCtrls, Graphics, StdCtrls;
type
TForm1 =
class(TForm)
PBox: TPaintBox;
procedure FormCreate(Sender: TObject);
procedure FormPaint(Sender: TObject);
end;
var
Form1: TForm1;
BM: TBitmap;
implementation
{$R *.dfm}
procedure TForm1.FormCreate(Sender: TObject);
begin
// BM wird mit blauen Hintergrund erstellt
BM:=TBitmap.create;
BM.Width:=790;
BM.Height:=590;
BM.Canvas.Brush.Color:=clBlue;
BM.Canvas.FillRect(Rect(0,0,790,590));
// Extra Grafik wird hineingeladen
BM.LoadFromFile('
dat/ferby-speed.bmp');
end;
procedure TForm1.FormPaint(Sender: TObject);
begin
BitBlt(PBox.Canvas.Handle, 0, 0, BM.Width, BM.Height, BM.Canvas.Handle, 0, 0, SrcCopy);
end;
end.