I am having some problems trying to show a form from another thread, the form gets shown but is in a frozen (non-responsive) state.
Heres the code...
frmProfile p = new frmProfile();
p.Show();
Any ideas?
I typically use this delegate for my invocations:
private delegate void SyncDel();
Do you have an instance of your main form?
SyncDel del = delegate()
{
frmProfile p = new frmProfile();
p.Show();
};
if (mainForm.InvokeRequired)
mainForm.Invoke(del);
else
del();
This should work on any pre-existing control. You just need a control that's already there. I'm guessing that you're inside of an event handler - your sender parameter should even work, cast to Control. :)
Thanks a lot mate, its work now :)