Thanks for the details, but that is exactly what i'm doing
Dim frmB2B As New B2B
frmB2B.ShowDialog(Me)
i have another, class where i put all the common function and subs
from what you have explained, i understood that the doWork updates default instance. so in my case there is no default instance. and UI gets updated when invoking the .ProgressChanged event if the caller is in frmB2B, but it doesnt seem to update if the caller is in the commons class.
here is an illustration of what i have
as i mentioned before, if i set a timer in B2B to update the progress Bar from a public variable updated in XY, this worked for meCode:class B2B bgWorker.DoWork call AB() Call Commons.XY() end sub sub AB bgWorker.progesschange(...) ' Updates UI end Sub end class class commons sub XY b2b.bgWorker.progesschange(...) ' UI not updated end sub end class




Reply With Quote