![]() |
Erbitte Hilfe bei MarqueeProgressBar !!
Ich verwende für meinen SplashScreen eine MarqueeProgressBar, das Problem ist nur, dass sie sich im Minutentakt einen Schritt weiter bewegt und nicht flüssig läuft, wie man das von Windows XP kennt. :(
Delphi-Quellcode:
das wäre der code, wobei nes sich bei Form5 um die SplashScreen Form handelt.
program Project4;
uses Forms, Unit1 in 'Unit1.pas' {Form1}, Unit2 in 'Unit2.pas' {Form2}, Unit3 in 'Unit3.pas' {Form3}, Unit4 in 'Unit4.pas' {Form4}, SplashScreen in 'SplashScreen.pas' {Form5}; {$R *.res} begin Application.Initialize; Form5 := TForm5.Create(Application); with TForm5.Create(nil) do try Form5.Show; Form5.Update; MarqueeProgressBar1.Max := 100; Show; // Startbildschirm mit ProgressBar anzeigen Update; // Anzeige von Form5 auslösen Application.Initialize; Application.Title := 'Project4'; Application.CreateForm(TForm4, Form4); MarqueeProgressBar1.StepBy(25); Application.CreateForm(TForm1, Form1); MarqueeProgressBar1.StepBy(25); Application.CreateForm(TForm3, Form3); MarqueeProgressBar1.StepBy(25); Application.CreateForm(TForm2, Form2); MarqueeProgressBar1.StepBy(25); Finally free; Form5.visible :=false; end; Application.Run; end. |
Re: Erbitte Hilfe bei MarqueeProgressBar !!
Hallo!
Hilfe eventuell ein Application.ProcessMessages weiter??
Delphi-Quellcode:
SCRaT
Application.CreateForm(TForm4, Form4);
MarqueeProgressBar1.StepBy(25); Application.ProcessMessages; |
Re: Erbitte Hilfe bei MarqueeProgressBar !!
Ne, leider hat das nicht geholfen.
Code sieht jetzt so aus, und bringt leider auch keine Hilfe:
Delphi-Quellcode:
program Project4;
uses Forms, Unit1 in 'Unit1.pas' {Form1}, Unit2 in 'Unit2.pas' {Form2}, Unit3 in 'Unit3.pas' {Form3}, Unit4 in 'Unit4.pas' {Form4}, SplashScreen in 'SplashScreen.pas' {Form5}; {$R *.res} begin Application.Initialize; Form5 := TForm5.Create(Application); with TForm5.Create(nil) do try Form5.Show; Form5.Update; MarqueeProgressBar1.Max := 100; Show; // Startbildschirm mit ProgressBar anzeigen Update; // Anzeige von Form5 auslösen Application.Initialize; Application.Title := 'Project4'; Application.CreateForm(TForm4, Form4); MarqueeProgressBar1.StepBy(25); Application.ProcessMessages; Application.CreateForm(TForm1, Form1); MarqueeProgressBar1.StepBy(25); Application.ProcessMessages; Application.CreateForm(TForm3, Form3); MarqueeProgressBar1.StepBy(25); Application.ProcessMessages; Application.CreateForm(TForm2, Form2); MarqueeProgressBar1.StepBy(25); Application.ProcessMessages; Finally free; Form5.visible :=false; end; Application.Run; end. |
Re: Erbitte Hilfe bei MarqueeProgressBar !!
Ruf mal nach
Delphi-Quellcode:
ein
MarqueeProgressBar1.StepBy(25);
Delphi-Quellcode:
auf.
MarqueeProgressBar1.Refresh
|
Re: Erbitte Hilfe bei MarqueeProgressBar !!
:( Ne, hat leider auch nichts gebracht.
:?: Kann es vielleicht sein, dass ich die restlichen Formen schon ganz anders aufrufen muss? |
Re: Erbitte Hilfe bei MarqueeProgressBar !!
Hallo,
dauert das Erstellen der anderen Formulare so lange? Wenn das "...CreateForm()" jedesmal so viel Zeit in Anspruch nimmt tut sich natürlich während dessen nichts im ProgressBar. Du setzt die Anzeige ja immer um 25 hoch. Das heißt aber nicht(!), daß die Anzeige dann autom. schön sanft den Fortschrittsbalken länger macht, sondern daß der Balken "ruckartig" (und vor allen sofort) verlängert wird. Vermutlich wirst Du das anders lösen müssen (Stichwort: Hintergrundthread). Allerdings ist dann dein Hauptproblem, daß Du nicht weißt, wie lange das erzeugen eines einzelnen Formulars dauert. |
Re: Erbitte Hilfe bei MarqueeProgressBar !!
Na die Formulare sind mit der Eigenschaft "sleep(2500);" versehen, damit der SplashScreen auch ein bisschen länger zu sehen ist.
|
Re: Erbitte Hilfe bei MarqueeProgressBar !!
Bei Sleep() friert das ganze Programm ein. Nutze stattdessen lieber
![]() |
Re: Erbitte Hilfe bei MarqueeProgressBar !!
Und wo baue ich dieses Delay ein ??
|
Re: Erbitte Hilfe bei MarqueeProgressBar !!
Statt sleep.
|
Alle Zeitangaben in WEZ +1. Es ist jetzt 04:32 Uhr. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz