I have a thread that needs to create a popup Window. I start the thread using ThreadPool.QueueUserWorkItem(new WaitCallback(CreatePopupinThread)) Thew thread creats a new form. The application freases in the new Form constructor at CreateHandle. The Worker Thread is locked... How can I fix this?
this is how I create the form
var form = new ConfirmationForm
{
Text = entry.Caption,
Label = entry.Text,
};
In the constructor the thread enters a deadlock
public ConfirmationForm()
{
InitializeComponent();
}