unit Unit1;

interface

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

type
  TForm1 = class(TForm)
    Button1: TButton;
    Image1: TImage;
    procedure Button1Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}

{$J+}
procedure TForm1.Button1Click(Sender: TObject);
const i:integer=0;
begin
  case i of
  0: Image1.Picture.LoadFromFile('obraz1.bmp');
  1: Image1.Picture.LoadFromFile('obraz2.jpg');
  2: Image1.Picture.LoadFromFile('obraz3.bmp');
  end;
  i:=(i+1) mod 3;
end;

end.
