unit Main;

interface

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

type
  TMainForm = class(TForm)
    Label1: TLabel;
    lblPROCENT: TLabel;
    Panel1: TPanel;
    imgKONIEC: TImage;
    imgDOIT: TImage;
    TrackBar1: TTrackBar;
    procedure imgDOITClick(Sender: TObject);
    procedure imgKONIECClick(Sender: TObject);

  private

  public

  end;

var
  MainForm: TMainForm;

implementation
{$R *.dfm}
{------------------------------------------------------------------------------}
procedure TMainForm.imgDOITClick(Sender: TObject);
var
	tt : Integer;
	kk : Integer;

begin
	imgDOIT.Visible := false;

   for tt := 1 to 100 do
   begin
   	for kk := 1 to 10000000 do
   	begin
			// empty      
      end;

      TrackBar1.Position := TrackBar1.Position + 1;

      lblPROCENT.Caption := IntToStr(TrackBar1.Position);
      Application.ProcessMessages();
   end;

	imgDOIT.Visible := true;
end;

procedure TMainForm.imgKONIECClick(Sender: TObject);
begin
	Close();
end;

end.
