Beispiel #1
0
        private void toolStripButton1_Click(object sender, EventArgs e)
        {
            try
            {
                if (taskForm.IsDisposed != true)
                {
                    // 不是顶级窗体,即不是桌面窗口
                    //taskForm.TopLevel = false;
                    //   taskForm.Dock = DockStyle.Fill;
                    //  taskForm.Parent = splitContainer1.Panel2;

                    taskForm.Show();  //弹出这个窗口
                    taskForm.Focus(); //激活显示

                    taskForm.WindowState = FormWindowState.Normal;
                }
                else
                {
                    taskForm = new TaskForm();

                    // 不是顶级窗体,即不是桌面窗口
                    //taskForm.TopLevel = false;
                    //taskForm.Dock = DockStyle.Fill;
                    //taskForm.Parent = splitContainer1.Panel2;

                    taskForm.Show();  //弹出这个窗口
                    taskForm.Focus(); //激活显示
                    taskForm.WindowState = FormWindowState.Normal;
                }
            }
            catch
            {
            }
        }
Beispiel #2
0
 private void toolStripButton1_Click(object sender, EventArgs e)
 {
     if (taskForm.IsDisposed != true)
     {
         taskForm.TopLevel = false;
         taskForm.Parent   = splitContainer3.Panel1;
         taskForm.Show();  //弹出这个窗口
         taskForm.Focus(); //激活显示
     }
     else
     {
         taskForm = new TaskForm();
         taskForm.Show();  //弹出这个窗口
         taskForm.Focus(); //激活显示
     }
 }