Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/svg/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Winforms 如何使用Winform在主窗体A之后最小化子窗体C的子窗体B_Winforms_Owner - Fatal编程技术网

Winforms 如何使用Winform在主窗体A之后最小化子窗体C的子窗体B

Winforms 如何使用Winform在主窗体A之后最小化子窗体C的子窗体B,winforms,owner,Winforms,Owner,如何使用Winform在主窗体A之后最小化子窗体C的子窗体B。 在主表格A调用子表格B之后。 子窗体B然后调用B自己的子窗体C int i = 0; private void formAOpenFormBToolStripMenuItem_Click(object sender, EventArgs e) { var fb = new FormB(); fb.TopLevel = false; fb.Dock =

如何使用Winform在主窗体A之后最小化子窗体C的子窗体B。 在主表格A调用子表格B之后。 子窗体B然后调用B自己的子窗体C

    int i = 0;
    private void formAOpenFormBToolStripMenuItem_Click(object sender, EventArgs e)
    {
        var fb = new FormB();
        fb.TopLevel = false;      
        fb.Dock = DockStyle.Fill;
        fb.FormBorderStyle = FormBorderStyle.SizableToolWindow;
        fb.Show();
        TabPage Page = new TabPage();
        Page.Name = "Page" + i;
        Page.Text = "tabPage" + i;
        Page.TabIndex = i;
        this.tabControl1.Controls.Add(Page);
        tabControl1.SelectedTab = Page;     
        tabControl1.TabPages[i].Controls.Add(fb);
        tabControl1.TabPages[i].Text = fb.Text+i;
        i++;
    }
    private void formBButton1_Click(object sender, EventArgs e)
    {
        var frmC = new FormC();
        frmC.FormBorderStyle = FormBorderStyle.SizableToolWindow;
        frmC.Owner = this;
        frmC.Show();
    }
    private void formBButton2_Click(object sender, EventArgs e)
    {
        var frmC = new FormC();
        frmC.FormBorderStyle = FormBorderStyle.SizableToolWindow;
        frmC.TopLevel = false;
        frmC.Parent = this;
        frmC.Show();               
    }
可能
b.Show(这个)
a
中,然后
c.Show(this.Owner)b
中的code>(当
此.Owner
不为空时)。