Solved
Object reference not set to an instance of an object
Posted on 2004-08-25
I know why this is happening I just don't know how to fix it. I have the following code in a class:
Dim frm As New frmStateDTS
frm = frmStateDTS.ActiveForm
frm.Invoke(frm.CallBindStudentData)
In this class, a dataset is being filled from text file. When the file is imported I call the "callBindDtudentData" method invoker so I can bind the datagrid in my form with the dataset filled in the class. This operation can take a long time so I may minimize the form and open another window. When it gets to the line
'frm.Invoke(frm.CallBindStudentData)' I get the following error:
Object reference not set to an instance of an object.
This only happens when the form is not the top window or I have another window (ie web browser) open on top of the form.