Einzelnen Beitrag anzeigen

Benutzerbild von blawen
blawen

Registriert seit: 30. Nov 2003
Ort: Luterbach (CH)
654 Beiträge
 
Delphi 12 Athens
 
#9

Re: SplashScreen Problem

  Alt 19. Okt 2008, 00:29
Eine kleine Erklärung zu Processmessages findest Du z.B. hier:

In meinem (gekürzten) Bsp. rufe ich ein Intro-Fenster auf und aktualisiere darin die Progressbar.
(In diesem Bsp. arbeite ich ohne Processmessages)

Delphi-Quellcode:
var
 Intro : TSplashScreen;

begin
  Application.Title := 'XY';
  Application.CreateForm(TFMainform, FMainform);
  Application.Initialize;
  Intro:=TSplashScreen.Create(Application);
  Try
    Intro.Show;
    Intro.UpDate;
    sleep(1000);
    Intro.Hide;
    Application.CreateForm(TFLogin, FLogin);
  Finally
    Intro.Free;
  End;
  .
  .
  { Passwortabfrage wird nach dem Intro ausgeführt }
  FLogin.ShowModal;
  .
  .
  { Passwortabfrage erfolgreich }
  { Intro-Fenster wird wieder eingeblendet und die Progressbar sichtbar gemacht }
    TRY
      Intro:=TSplashScreen.Create(Application);
      Intro.ProgressBar1.Visible := True;
      Intro.Show;
      Intro.UpDate;

      Intro.ProgressBar1.Position := 5;
      Application.CreateForm(TFMD, FMD);

      Intro.ProgressBar1.Position :=10;
      Application.CreateForm(TFPLZ_Ort_Ausw, FPLZ_Ort_Ausw);
      .
      .
      .
      Intro.ProgressBar1.Position := 90;
      Application.CreateForm(TFImportExport, FImportExport);

      Intro.Hide;
      Intro.Free;
      Application.Run;
    Except
      ShowMessage('Initialisierungsfehler');
      Application.Terminate;
      Application.Free;
    end;
end.
Roland
  Mit Zitat antworten Zitat