单击 menustrip 中的菜单时,如何一次只允许一个窗口?
例如:我有 Menustrip Ordre、Tarif 等……当我第一次单击 Ordre 时,它会打开一个新表单,但第二次我想禁止它。
private void ordresToolStripMenuItem_Click(object sender, EventArgs e)
{
if (Already open)
{
}
else
{
Lordre newMDIChild = new Lordre(ClientId);
// Set the Parent Form of the Child window.
newMDIChild.MdiParent = this;
// Display the new form.
newMDIChild.Show();
}
}
提前谢谢你