29-11-2011, 08:34 AM
طريقة أو حل سريع لكنه ليس انيق!
عدد الForm لديك مثلا 10 يكون :
عدد الForm لديك مثلا 10 يكون :
كود :
[COLOR="Red"]
Procedure Update;
Begin
splashscreen.ProgressBar1.Position:=splashscreen.ProgressBar1.Position+1;
Sleep(Random(400));
end;[/COLOR]
begin
splashscreen:=Tsplashscreen.Create(Application);
try
splashscreen.Show;
[color=red]//[/color]splashscreen.Timer1.Enabled:=true;
[color=red] splashscreen.ProgressBar1.MAX:=10;[/color]
splashscreen.ProgressBar1.Position:=[color=Red]0[/color];
splashscreen.Update;
Application.Initialize;
splashscreen.Update;
[color=red]//[/color]sleep(10000);
Randomize;
Application.CreateForm(TForm1, Form1);[color=red]Update;[/color]
Application.CreateForm(TForm2, Form2)[color=red];Update[/color];
Application.CreateForm(TForm3, Form3);[color=red]Update;[/color]
Application.CreateForm(TForm4, Form4);[color=Red]Update;[/color]
Application.CreateForm(TForm5, Form5);[color=red]Update;[/color]
Application.CreateForm(TForm6, Form6);[color=red]Update;[/color]
Application.CreateForm(TForm7, Form7);[color=red]Update;[/color]
Application.CreateForm(TForm8, Form8);[color=red]Update;[/color]
Application.CreateForm(TForm9, Form9);[color=red]Update;[/color]
Application.CreateForm(TForm10, Form10);[color=red]Update;[/color]
splashscreen.Hide;
finally
Application.Run;
end;
splashscreen.Free;
end.
