how to run the progresbar.......??
-
i hav some huge amount of data loading into a grid... so i want to show a progresbar which shows the % completed . how do i do it..??
The progress bar you have to set the min and max value and call the increment method when you have made some progress. You can also set the value directly. So your problem is know how far along are you in loading your grid. I am guessing you probably don't know that. So the best you can probably do, is put a timer control which executes every second. When the timer method runs increment the progress bar and refresh the form with Application.DoEvents. So then you users will think some progress is being made. Ben
-
i hav some huge amount of data loading into a grid... so i want to show a progresbar which shows the % completed . how do i do it..??
-
The progress bar you have to set the min and max value and call the increment method when you have made some progress. You can also set the value directly. So your problem is know how far along are you in loading your grid. I am guessing you probably don't know that. So the best you can probably do, is put a timer control which executes every second. When the timer method runs increment the progress bar and refresh the form with Application.DoEvents. So then you users will think some progress is being made. Ben
-
i hav some huge amount of data loading into a grid... so i want to show a progresbar which shows the % completed . how do i do it..??
poda poda
-
poda poda
Dileep_Vickey wrote:
poda poda
:confused:
-
i hav some huge amount of data loading into a grid... so i want to show a progresbar which shows the % completed . how do i do it..??
Xandip wrote:
i hav some huge amount of data loading into a grid...
Why? The user only has so much screen space...
Xandip wrote:
so i want to show a progresbar which shows the % completed
This depends on where your code is spending all of it's time waiting. It 's waiting for a database query to return, there's nothing you can do to make a ProgressBar work. You need to use something that actually returns data in chunks in order for a ProgressBar to work. You can fill a DataSet object yourself using a DataReader, like this example[^], but this method is slower and will take longer to build your DataSet. Another version of a ProgressBar doesn't really show progress. Instead, it just shows something is going on, kind of like the Windows XP installation "little green boxes" that march along during the install. They don't show actual progress, just something that's moving to show that the machine hasn't locked up. You can find an example of this here[^].
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007 -
poda poda
are you a malayalee, why are you bullying people:mad:
Vilsad P P MCTS (Windows Applications) .Net 2.0