Search code examples
delphidelphi-xe2delphi-7

Splash screen with progress bar


My database takes quite some time to load (it is on network) so I thought to display a splash screen with some animation (progress bar or some simple animation) to keep the user occupied.Since it is everyone's guess when will the table open, so I can not use a timer for running the progress bar. So some animated gif is probably a better choice. However, how can I hide/free the splash screen just before the table opens (and main form shows) ???


Solution

  • you can use a Ttimer and update a TprogressBar inside until the loading is over .

    for the the timer use the function "on timer" put the parameter interval to 500 ms

    To finish when the loading is over make the TprogressBar not visible and the timer enabled value to false and finallely show your main form