PDA

Click to See Complete Forum and Search --> : Progress bar help


stevozip
Aug 26th, 2001, 10:34 PM
I am writing a project for the heck of it, and want to add a progress bar to the project. The goal of the progress bar is to check a person's user name they are trying to register to verify the user name doesn't already exist within a database. The progress bar appears on a separate form after clicking a "validate user name" button. How do I make the progress bar "progress" from start to finish?

cron912
Aug 27th, 2001, 10:38 AM
:confused:
I don't know if I fully understand what you're looking for, but I'll give it a shot.

From your comments, it appears that the user is going to enter a username, then when they click the "validate user name" button, you want to display a progress bar while the app hits a database to validate that the user name exists, meanwhile updating the bar until the database call returns. Is this correct?

If that's the case, it would be practically impossible (and not worth your time). The database call would be non-asynchronis (sp?), so when you make the call, you wouldn't be able to update the bar until it returned. Personally, in those situations, I like to use an AVI file (animation).

However, if you really need a progress bar, you might try using a callback timer. You could just randomly update the bar each timer tick, so it wouldn't be 'in-synch' with your database call. Look at the SetTimer and KillTimer API functions.

stevozip
Aug 27th, 2001, 11:56 AM
Thank you for the information. You were correct in your assumption, and the information you have given me is greatly appreciated. If it's not possible, it's not possible. Oh well. ;)