I am trying to create an animated pop-up screen while my application loads its database. I already created splashscreen, but I want the image to "move" from left to right when db is converted. I searched for a while, but all I could find was about progress bars ...
Here is my code:
SplashScreen := TSplashScreen.Create(Application) ; SplashScreen.Show; Application.Initialize; SplashScreen.Update; SplashScreen.lblStatus.Caption:='Loading...'; SplashScreen.Update; SplashScreen.lblStatus.Caption:='Updating database...'; SplashScreen.Update; Application.Initialize; Application.CreateForm(TfmMain, fmMain); Sleep(1000); Application.CreateForm(TfmPrefs, fmPrefs); Application.CreateForm(TfmCode, fmCode); Application.CreateForm(TfmEmps, fmEmps); Application.CreateForm(TfmRest, fmRest); Application.ShowMainForm:=FALSE; SplashScreen.Hide; SplashScreen.Free; Application.Run;
In my splashscrren form, I created 5 duplicates of the same image, and when creating the main form, I want the image to be visible and invisible as an alternative ... ex:
while my db loads... begin Splashscreen.Image1.Visible:=FALSE; SplashScreen.Update; Sleep(25); SplashScreen.Image1.Visible:=FALSE; SplashScreen.Update; SplashScreen.Image2.Visible:=TRUE;....
etc.
Any thoughts?
source share