How to setup Progress Meter/Bar

G

Guest

I need to create a progress bar that will show that a form is loading. To
start off I have a splash screen with a 10 second timer and then after that
it opens up a Log In screen. I would like a progress meter to show the
progress of the 10 seconds just to show that it is doing something. I have
the progress meter/bar on the form but don't know how to code it to get it to
work with the timer.
 
G

Graham Mandeno

Hi Dustin

Instead of setting your timer to 10 seconds, set it to a fraction of that -
say 100 milliseconds. Then, in your Timer event procedure, increment a
static counter variable and update your progress bar. When the counter
variable reaches 100 you can close the form.

BTW, don't you think 10 seconds is an awfully long time to display the
splash screen? I would get very annoyed if I had to wait that long each
time I opened an application!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top