public partial class MainMenu : Form
{
public MainMenu()
{
InitializeComponent();
}
windowOne One;
windowTwo Two;
private void OneToolStripMenuItem_Click(object sender, EventArgs e)
{
if (One != null)
{
One.WindowState = FormWindowState.Normal;
One.Focus();
}
else
{
One = new windowOne();
One.MdiParent = this;
One.FormClosed += (o, ea) => One = null;
One.Show();
}
}
private void TwoToolStripMenuItem_Click(object sender, EventArgs e)
{
if (Two != null)
{
TwoWindowState = Two.Normal;
Two.Focus();
}
else
{
Two = new windowTwo();
Two.MdiParent = this;
Two.FormClosed += (o, ea) => Two = null;
Two.Show();
}
}
林初學者在c#, IM在窗口應用程序的工作,我希望當windowOne是打開的用戶couldnot打開windowTwo,使用上述碼即時通訊以避免打開windowOne或windowTwo agian。限制開口窗B時的窗口A是開放
沒有但僅滿足一個要求,但我希望當一個窗口被打開,窗戶無法打開,而且,我不知道.. – rummykhan