Progress Bars
I am wanting to display a progress bar while my program is loading data from and access Db using the DataAdapter.Fill method.
Does anyone know if this is possible ?
thanks
tattoo
I am wanting to display a progress bar while my program is loading data from and access Db using the DataAdapter.Fill method.
Does anyone know if this is possible ?
thanks
tattoo
it is possible but remember progress bars are not really accurate, they are just for the user's convenience to let them know that there is some processing going on.
There are a few topics on the forums about this, do a search and im sure you will get some results back on implementing a progress bar during your operation.
take a look at this and see if it helps:
I would also reccomend that you check out the BackgroundWorker component. Using the BackgroundWorker component you can place your loading work on a background thread, which will allow your form to remain responsive (and your progress bar to update) while the task is running.
-Scott Wisniewski
I have tried adding a Backgroundworker component from the Components tab in the toolbox but I didn't see one there. When I tried to add it to the list it wasn't one of the options.
I am using VB.Net 2003 Version 7.1.3088.
Is this a function of 2005 ?
If so, is there an equivalent in 2003 ?
Thanks in advance
tattoo
Are you sure that you even with the background worker process you are going to be able to determine how many records it has currently read in on the dataadapter .fill method and display a progress bar representative of this.
I would think that using a thread or background worker process could be used for the data fill operation if its taking some time, but main thread UI would update the progress bar. but htis would simply be a some moving progress bar showing something is happening but this is not representative of the % of records loaded in the fill statement.
In 2003 you would need to code some functionality to move the progress bar (perhaps using a timer every so many milliseconds to move the progress bar) but in 2005 and in 2005 you should be able to use the
Me.ProgressBar1.Style = ProgressBarStyle.Marquee
Involving no other code to make the progress bar move bar and forth which will display a moving progress bar going back and forth indicating something is occuring.
The loading would be carried out in the background thread whilst the UI is updated in the Main thread. When the fill method is complete you could show 100% progress on the progress bar momentarily before hidding and continuing.
That said, how long is the load taking ? Is the progress bar really worth it if is taking a second or two or would a pointer changing to an hourglass be sufficient.
Dear All,
I am using .net framework 1.1 (C# web application) but backgroundworker component is available only for .net framework 2.0. How will I calculated background work using .net framework 1.1? I just want to display some image or animated pic(% is not required for me) while some work is going on. Can any one help me to solve the problem?
Thank you,
Regards
CT
You can do this by creating a new backgound thread, and having the code to drive the animation run there. You can find information about threading in VB here: http://msdn.microsoft.com/msdnmag/issues/01/07/vbnet/.
-Scott