Author: William Gerbert Paint the form with a tiled bitmap Answer: You may use this code to accomplish it: 1 type 2 TForm1 = class(TForm) 3 procedure FormCreate(Sender: TObject); 4 procedure FormPaint(Sender: TObject); 5 private 6 { private declarations } 7 public 8 { public declarations } 9 destructor Destroy; override; 10 end; 11 12 var 13 Form1: TForm1; 14 Bitmap: TBitmap; 15 16 .. 17 18 procedure TForm1.FormCreate(Sender: TObject); 19 begin 20 Bitmap := TBitmap.Create; 21 Bitmap.LoadFromFile('C:\WINDOWS\cars.BMP'); 22 end; 23 24 destructor TForm.Destroy; 25 begin 26 inherited; 27 Bitmap.Free; 28 end; 29 30 procedure TForm1.FormPaint(Sender: TObject); 31 var 32 X, Y, W, H: LongInt; 33 begin 34 with Bitmap do 35 begin 36 W := Width; 37 H := Height; 38 end; 39 Y := 0; 40 while Y < Height do 41 begin 42 X := 0; 43 while X < Width do 44 begin 45 Canvas.Draw(X, Y, Bitmap); 46 Inc(X, W); 47 end; 48 Inc(Y, H); 49 end; 50 end;