Exemplo n.º 1
0
        private void btnTask_Click(object sender, EventArgs e)
        {
            int nI = 0;

            foreach (Form form in Application.OpenForms)
            {
                if (form.Name == "frmTasksView")
                {
                    form.Activate();
                    form.BringToFront();
                    nI++;
                }
            }
            if (nI == 0)
            {
                frmTasksView TasksView = new frmTasksView();
                TasksView.MdiParent = this;
                this.splitContainer2.Panel2.Controls.Add(TasksView);
                TasksView.Dock = DockStyle.Fill;
                TasksView.Show();
            }
        }
Exemplo n.º 2
0
 private void btnTask_Click(object sender, EventArgs e)
 {
     int nI = 0;
     foreach (Form form in Application.OpenForms)
     {
         if (form.Name == "frmTasksView")
         {
             form.Activate();
             form.BringToFront();
             nI++;
         }
     }
     if (nI == 0)
     {
         frmTasksView TasksView = new frmTasksView();
         TasksView.MdiParent = this;
         this.splitContainer2.Panel2.Controls.Add(TasksView);
         TasksView.Dock = DockStyle.Fill;
         TasksView.Show();
     }
 }