unit LoadingForm;

interface

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

type
  TLoadingFrm = class(TForm)
    ProgressLbl: TLabel;
    LogRich: TRichEdit;
    procedure FormCreate(Sender: TObject);
    procedure FormClose(Sender: TObject; var Action: TCloseAction);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  LoadingFrm: TLoadingFrm;

function AddLeading(s:string; needed:word; leading:char='0'):string;

implementation

uses StrUtils;

function AddLeading(s:string; needed:word; leading:char='0'):string;
begin
 Result := DupeString(leading, needed-Length(s))+s;
end;

{$R *.dfm}



procedure TLoadingFrm.FormCreate(Sender: TObject);
var i:byte;
begin
 DoubleBuffered := true;
end;

procedure TLoadingFrm.FormClose(Sender: TObject; var Action: TCloseAction);
var i:byte;
begin
 Action := caNone;
 Hide;
end;

end.
