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 Answers
Know the answer? Post it. Somebody with the same question will find it here.

Sundaram SubramanianRank #150 · 15.2K reputationPosted Aug 2, 2017, 5:56 PM EDT
Amit GuptaRank #190 · 12.8K reputationPosted Aug 2, 2017, 8:45 PM EDT
Mustafa TURK7 reputationPosted Aug 3, 2017, 4:58 AM EDT
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