bool IsOpen = false;
foreach (Form f in Application.OpenForms)
{
if (f.Text == "Send506Form")
{
IsOpen = true;
f.Focus();
f.Dock = DockStyle.Fill;
f.WindowState = FormWindowState.Normal;
f.MaximizeBox = false;
f.MinimizeBox = false;
f.Show();
// break;
}
}
if (IsOpen == false)
{
Send506Form f2 = new Send506Form();
f2.MdiParent = this;
f2.Dock = DockStyle.Fill;
f2.MaximizeBox = false;
f2.MinimizeBox = false;
f2.Show();
}
ไม่มีความคิดเห็น:
แสดงความคิดเห็น