예제 #1
0
        private void CheckActiveChildForm(Form FormControl, string FormExists)
        {
            int h = 0;

            if (MdiChildren.Count() > 0)
            {
                for (int i = 0; i < MdiChildren.Count(); i++)
                {
                    if (MdiChildren.ElementAt(i).Text == FormExists)
                    {
                        h = 1;
                        MessageBox.Show(FormExists + " masih aktif!", "Informasi!", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                        MdiChildren.ElementAt(i).BringToFront();
                    }
                }
            }
            if (h == 0)
            {
                FormControl.MdiParent = this;
                FormControl.Show();
            }
        }