unit uStatus;

interface

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

type
  TFormStatus = class(TForm)
    LabelTitleMessage: TLabel;
    ProgressBar: TProgressBar;
    LabelFrontendVersion: TLabel;
    LabelMessage: TMemo;
    ImageTopBar: TImage;
    procedure FormCreate(Sender: TObject);
    procedure FormShow(Sender: TObject);
    procedure FormCloseQuery(Sender: TObject; var CanClose: Boolean);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  FormStatus: TFormStatus;

implementation

uses uMain, uCommon;

{$R *.dfm}

procedure TFormStatus.FormCreate(Sender: TObject);
begin
  if FileExists(FormMain.AppPath+'images\topbar.png') then
     ImageTopBar.Picture.LoadFromFile(FormMain.AppPath+'images\topbar.png');
  LabelFrontendVersion.Caption:= 'v'+GetFileInfo(Application.ExeName, VersionInfo[3]);
end;

procedure TFormStatus.FormShow(Sender: TObject);
begin
  FormStatus.Left:= (Screen.Width shr 1)-(Width shr 1)-1;
  FormStatus.Top:=  (Screen.Height shr 1)-(Height shr 1)-1;
  SetWindowPos(FormStatus.Handle, hWnd_TopMost, 0, 0, 0, 0, SWP_NOMOVE+SWP_NOSIZE);
end;

procedure TFormStatus.FormCloseQuery(Sender: TObject;
  var CanClose: Boolean);
begin
  if CanClose then
     ProgressBar.Position:= 0;
end;

end.
