Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/Delphi/Elbe 1.0/Sources/     Datei vom 31.7.2010 mit Größe 3 kB image not shown  

Quelle  Splash.pas   Sprache: Delphi

 

unit Splash;
interface
uses
  //----------------------------------------------------------------------------
  //local
  //----------------------------------------------------------------------------
  Utilities,Language,
  //----------------------------------------------------------------------------
  //global
  //----------------------------------------------------------------------------
  Forms,ExtCtrls,StdCtrls,Graphics,Controls,Classes,ComCtrls,jpeg,Buttons,
  GIFImg;
type
  TSplashForm= class(TForm)
    ProgressBar1:TProgressBar;
    Image1:TImage;
    Image2:TImage;
    Image3:TImage;
    Panel1:TPanel;
    VersionInfo:TLabel;
    Procedure SetInfo(S:String);
    procedure SetMini();
    procedure FormCreate(Sender:TObject);
    procedure Init(Value:Longint);
    procedure Progress(Value:Longint);
    procedure Finish();
    procedure FormShow(Sender:TObject);
  public
    ismini:boolean;
  end;
var
  SplashForm1:TSplashForm;
implementation
{$R *.dfm}
//----------------------------------------------------------------------------
//
//----------------------------------------------------------------------------
procedure TSplashForm.FormCreate(Sender:TObject);
begin
  inherited Create(Owner);
  ismini:=false;
end;
//----------------------------------------------------------------------------
//
//----------------------------------------------------------------------------
procedure TSplashForm.SetInfo(S:String);
begin
  if not ismini then begin
    VersionInfo.Top:=Top+4;
    VersionInfo.Width:=Width-4;
    VersionInfo.BringToFront;
    VersionInfo.Font.Color:=clWhite;
    VersionInfo.Caption:=S;
    VersionInfo.Alignment:=taCenter;
    Show();
  end
  else
    VersionInfo.Hide();
  update();
end;
//----------------------------------------------------------------------------
//
//----------------------------------------------------------------------------
procedure TSplashForm.FormShow(Sender:TObject);
begin
  update();
end;
//----------------------------------------------------------------------------
//
//----------------------------------------------------------------------------
procedure TSplashForm.SetMini();
begin
  if not ismini then begin
    with ProgressBar1 do
      Height:=2*Height div 3;
    with Image1,Image2,Image3 do begin
      Height:=2*Height div 3;
      Width:=2*Width div 3;
    end;
    Height:=2*Height div 3;
    Width:=2*Width div 3;
  end;
  ismini:=true;
end;
//-----------------------------------------------------------------
//
//-----------------------------------------------------------------
procedure TSplashForm.Init(Value:Longint);
begin
  TotalSize:=Value;
  DoneSize:=0;
  ProgressBar1.Position:=0;
  Show();
  update();
end;
//-----------------------------------------------------------------
//
//-----------------------------------------------------------------
procedure TSplashForm.Progress(Value:Longint);
begin
  DoneSize:=DoneSize+Value;
  if TotalSize>0 then
    ProgressBar1.Position:=Round((DoneSize/TotalSize)*100);
  ProgressBar1.update;
  if DoneSize>=TotalSize then
    Hide();
end;
//-----------------------------------------------------------------
//
//-----------------------------------------------------------------
procedure TSplashForm.Finish();
begin
  Hide();
end;
//----------------------------------------------------------------------------
//Ende dieser Quelle
//----------------------------------------------------------------------------
end.

Messung
CHZG
100989597

¤ Dauer der Verarbeitung: 0.6 Sekunden  (vorverarbeitet am  2026-11-25) ¤

*© Formatika GbR, Deutschland