procedure DrawFormImage(Form: TForm; Bitmap: TBitmap; DrawMode: TDrawMode = dwCenter); var X, Y: Integer; begin case DrawMode of dwCenter: begin X := (Form.ClientWidth - Bitmap.Width) div 2; Y := (Form.ClientHeight - Bitmap.Height) div 2; Form.Canvas.Draw(X, Y, Bitmap); end; dwStretch: begin Form.Canvas.StretchDraw(Form.ClientRect, Bitmap); end; dwTile: begin Form.Canvas.Brush.Bitmap := Bitmap; Form.Canvas.FillRect(Form.ClientRect); end; end; end;