progressbar in popup

  • Thread starter Thread starter Sam
  • Start date Start date
S

Sam

Hi,
I have to process a large data loading in my form. In order to give a
feedback on the loading status, I'd like to display a progressbar in a
popup, in the middle of the screen. How can I do that, as the
progressbar is not in the same form as my data structures?

Thx
 
Sam,

There are hundreds ways that data is stored. Than there are probably
hundered ways that data is processes. What answer do you want from us a link
to the progressbar on MSDN?

Cor
 
Hi Cor,
That's true, I haven't been very clear.
I'm actually building a tree and I don't know how much time it's gonna
take or even how many items will be added, as the data come from many
different stored procedures. Therefore I'm thinking about showing a
progressbar during the time of the tree construction. Basically I would
show the form that contains the bar before calling my BuildTree
function and I would close it as soon as the function finished. I would
like the bar to actually move from left to right and then from right to
left, kindof a fancy effect.
How can I achieve that?
 
Sam,

What is the in memory data the stored procedures point to. When it is a
dataset or datatables, how many Fill you have to handle?

If it is a datareader, than you can take two progressbars above each other.

In my idea is the simplest approach counting the stored procedures and take
those as steps. The progressbar documentation on MSDN does that.

If you want a procedure that I will not advice however because it is often
asked and therefore this sample (however you can see in that how to use a
progressbar).

http://www.windowsformsdatagridhelp.com/default.aspx?ID=49f2cff5-56ad-44fc-a4c6-fc0d5c470f53

I hope this helps,

Cor


Cor
 
May I ask a question regarding the code on the link you gave me? In the
following block of code:

for( int i = 0 ; i < 100 ; ++i )
{
callback.SetText( String.Format( "Performing op: {0}", i )
);
callback.StepTo( i );
if( callback.IsAborting )
{
return;
}
// Do a block of work
if( callback.IsAborting )
{
return;
}
}

When the author wrote //Do a block of work, I don't understand how you
can do different operations at each loop. Because obviously since I'm
building a tree, at each iteration of the for loop, I would like to
call a different method that handles building a sub-part of my tree.
(it's the way it currentely works). So how can I do that in this loop?

Thx
 

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

Back
Top