I have a Background Task that uploads a file, and i want it to report the progress to a progressbar on another form. How would i go about that? I’m slightly new to C# but long time VB .net programmer.
I was messing with this code but its totally wrong.
System.Windows.Forms.Form progForm = new ProgressWindows();
Control[] ctrls = progForm.Controls.Find("fileProgress1", true);
If you problem is just accessing the fileProgress1. The easiest solution is make it public in the ProgressWindow class. By default controls are private.
Then you can access the fileProgress1 control as below.
However the better way is exposing a public method in the PrefressWindows class that updates the progress.
In the ProgressWindows Class
Call the above method as below.