unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, Jpeg;

type
  TForm1 = class(TForm)
    procedure FormClose(Sender: TObject; var Action: TCloseAction);
    procedure FormCreate(Sender: TObject);
    procedure FormResize(Sender: TObject);
    procedure FormPaint(Sender: TObject);
  private
    { Private declarations }
    g: TJPEGImage;
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.FormClose(Sender: TObject; var Action: TCloseAction);
begin
g.Free;
end;

procedure TForm1.FormCreate(Sender: TObject);
begin
g:=TJPEGImage.Create;
end;

procedure TForm1.FormPaint(Sender: TObject);
begin
g.LoadFromFile('c:\WINDOWS\Web\Wallpaper\Fale.jpg');
Canvas.StretchDraw(Form1.ClientRect,g);
end;

procedure TForm1.FormResize(Sender: TObject);
begin
Refresh;
end;

end.
