I have a little problem. I have a lot of code in the backgroundWorker2 (//Do Stuff)
When pressing the button1_Click, everything works great and the code executes for the backgroundworker.
But if I now try to drag the form around on the desktop, the form will "get stuck"(Not Responding). It seems that something isnĀ“t ready yet, it seems that the backgroundworker still is doing something even that I have confirmed by code that it has reached its defenitive last line of code. I can wait for a minute after it is ready too and the same problem happens ?
If I put all code as it is in the button1_Click instead, it works fine.
It is to much code to post here but what could this depend on. Could there be anything with the backgroundWorkercontrol that I have to check that it is ready or anything simular to this ?
private: System::Void button1_Click(System::Object^ sender, System::EventArgs^ e)
{
backgroundWorker2->RunWorkerAsync();
}
private: System::Void backgroundWorker2_DoWork(System::Object^ sender, System::ComponentModel::DoWorkEventArgs^ e)
{
//Do stuff
}