You code look suspicious...
Why would you create a form from an arbitrary thread?
Why a model form would be already visible?
What is Instance property (or what is the type of
DataFormDlg
?).
Where is the code that call
DataFormDlg
constructor?
In most application, you should never need to use
BringToFront()
,
Activate()
,
Focus()
or
TopMost
. Obviously, you make simple things very complex.
Usually, you simply do something like this and it works:
void ParentForm_ShowDialogClicked(object sender, EventArgs args)
{
using (var form = new DataFormDlg())
{
form.ShowDialog(this);
}
}