Hello
I tested the solutions with verifying the from == null condition.
It's working good? But when I close the opened form and i try to reopen it. it's value is not null.
So to resolve this problem i catch the Form Closed event of opened form and i set the null value to my instance:
Form1 _iFrm;
private void Btn_Click(object sender, EventArgs e)
{
if (_iFrm == null)
{
_iFrm = new Form1 ();
_iFrm.FormClosed += new FormClosedEventHandler(_iFrm_FormClosed);
_iFrm.Show(this);
}
else
{
_iFrm.Activate();
}
}
void _iFrm_FormClosed(object sender, FormClosedEventArgs e)
{
_iFrm = null;
}
Hope this addition will help some people too!
Thanks
Ed