Hello dear Jean,
The way you build a TProgressBar depends on the action you are undertaking.
If you have a loop somewhere, it's easy to integrate the TProgressBar inside it (example attached).
If you are downloading a file, we lack some function integrated with Indy library : to do it the way it was intended, you need the OnWorkStart, OnWorkEnd properties we don't have, so you'll have to base your TProgressBar on the size of the file you are downloading and cut it into chunks to count how fast they come in... Ideally, this process should be in a separated thread, but it's not implemented yet in MVD.
According to your question, I assume you are loading a SQL file on first start of a program, to populate the database before the user can use it.
Attached is how I do it with my own application :
1- check for existence of the SQL file to be loaded
2- if exists, then load the SQL commands in a TStingList
3- execute each command line one by one with feedback to the user with TProgressBar and message in a TLabel
The code is commented and you'll see that it's pretty straightforward. This is how I do it, there might be other approaches. Also, I only use very few TProgressBar properties, but you can play with the color of the TProgressBar , the style, the orientation and so on.
Have fun and do not hesitate to come back if I misunderstood your question.
Cheers
Mathias
PS : I used beta 2.8 for this build, but might work with official 2.7
Post's attachments ProgressBar.zip 352.94 kb, 473 downloads since 2016-11-12
I'm a very good housekeeper !
Each time I get a divorce, I keep the house
Zaza Gabor