Form CurrentForm;
private void salaryDetailToolStripMenuItem_Click(object sender, EventArgs e)
{
saldetail sd = new saldetail();
[B]if(CurrentForm!=null)
{
MessageBox.show("Please close the other window");
//CurrentForm.close(); //uncomment this line if you want to close the other window.
CurrentForm=sd;
}
else
{
CurrentForm=sd;
}
[/B]
sd.MdiParent = this;
sd.Show();
}
Thanks for the help.
This does what i need.