Hello everyone

I am working on a ftp uploader and I have the class and the form. I have a progress bar on the form, but I need the class to tell the form to update the progress bar with the proper percent complete. I can't seem to figure out how to setup an observer like I would in java. Does anyone have any suggestions?

Thanks

Recommended Answers

All 4 Replies

Hello everyone

I am working on a ftp uploader and I have the class and the form. I have a progress bar on the form, but I need the class to tell the form to update the progress bar with the proper percent complete. I can't seem to figure out how to setup an observer like I would in java. Does anyone have any suggestions?

Thanks

Consider a Thread; Populate the counter which sums number of bytes are written off.

A ProgressBar has a Step property, which together with the Minimum and Maximum properties are used by the PerformStep() method.
MyBar.Minimum=0;
MyBar.Maximum=100;
MyBar.Step=2;

Use MyBar.PerformStep(); somewhere in a loop.

Thanks! I'm not as familiar with C# as with Java. Trying to get more familiar with C# I will check it out.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.