Hello AD1408
In my applications made with MVD, I frequently use a Splash on launching the exe
It works fine.
Use a Timer
CAREFUL : You have to place this piece of code between BEGIN and END. (at the end of the script)
Timer2 := TTimer.Create(nil); // Pour l'activation de l'écran d'accueil
Timer2.OnTimer := @OnTimer2; // event procedure
Timer2.Interval := 1000; // 1 sec
Timer2.Enabled := True; // Le Timer est déclenché
Splash.ShowModal; // On affiche l'écran d'accueil
Here there is Timer 2 because in the same application, I use another timer (Timer1)
Then, you have to initialize the timer
procedure OnTimer2 (Sender: TObject); // On initialise le splash
begin
iTimer := iTimer + 1;
if iTimer > 5 then // The 5 seconds are gone
begin
Timer2.Enabled := False; // We unload the Timer2
Splash.Close; // We close Splash form
Timer2.Free; // Essentiel : on libère le Timer2
Waiting.Show;
Application.ProcessMessages; // To avoid Windows to freeze the application
end;
end;
And first of all, you have to declare Timer1 as a variable
Var Timer, Timer2 : TTimer; (from the beginning of the script, so you have a global variable)
Hope this helps you
JB