I have a simple one form VB.NET desktop app, that does a little threading
like so
mThread = New System.Threading.Thread(AddressOf DoSearch)
mThread.Start()
mThread has been decleared with the form class
Dim mThread As System.Threading.Thread
The DoSearch sub is in the same class as my form, and this sub is adding
and changing values of controls on the form. I think it may be because of
this I'm getting the following errors.
Public Class >Form1<
An unhandled exception of type 'System.NullReferenceException' occurred in
system.windows.forms.dll
Additional information: Object reference not set to an instance of an
object.
Public Class >Form1<
An unhandled exception of type 'System.ArgumentNullException' occurred in
system.windows.forms.dll
Additional information: Value cannot be null.
It seems quite random.. The same search, with the same results may or may
not produce either of those errors or none at all?
Like I said.. My first though is that the thread some times just can not
find the form object class but I cant trace back in the code.. it always
brakes on that line "Public Class Form1"
Any ideas?
Thanks
DaveC