I get ObjectDisposedException after opening of the program.
The program is a form app and uses sqlite. I think it happens because I try to access form elements. I read some articles about this issue but I could not resolve.
Form(){
CheckForIllegalCrossThreadCalls = false;
// other codes
}
private void button1_Click(object sender, EventArgs e)
{
panel1.Visible = false;
panel2.Visible = true;
List products = new DbOperations().getAllProducts();
BindingSource source = new BindingSource();
source.DataSource = products;
dataGridView1.DataSource = source;
}
at this point, I got that error.
3 Replies
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Mustafa TURKPosted Aug 3, 2017, 8:58 AM
this thread is stopped with only external code frames on the call stack.external code frames are typically from frame work code but can also include other optimised modules which are loaded in target process
Amit GuptaPosted Aug 3, 2017, 12:45 AM
Sundaram SubramanianPosted Aug 2, 2017, 9:56 PM