How does one access WinForm controls such as ProgressBar
properties from another class?
Please see my code below. I know this might not be the best option
This looks like a big time code smell :).
You would need an instance of Form1 inside of Class1 in order to PBUpdate
.
Something tells me what you are doing is just not right.
Explain what you are trying to do and we can help. Otherwise there is no way to access PBUpdate unless you either made it a static function where you could call it like Form1.PBUpdate()
or you had an instance of Form1
within your class Class1