Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27512

[RESOLVED] Weird behaviour of variable scope using BackgroundWorker

$
0
0
I changed the scope of some Global variables to be private of a form, and added a readonly property for them.
From within the form a backgroundworker gets started which uses routines from a specific module (calculating my backgroundimage).
The above mentioned variables are need, so I try to read them in by the readonly properties, which only works for one of them????
The that it is working has no direct realtion to any control, while the other are copies of the pictureboxes-properties where the image is going to added (Width and Heigth).
My workaround was to handover the values into _DoWork Sub.
Cold anybody tell why it didn't work for all the properties as intended?

Viewing all articles
Browse latest Browse all 27512

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>