不要专注于MDI表格儿童

时间:2013-06-28 21:12:25

标签: c# forms focus mdi

原谅我的英文

我有一个Form MDI Conteiner,然后我打开一个像这样的儿童形式MDI

frSeries Serie = new frSeries();            
Serie.Opener = this;
Serie.MdiParent = this;
Serie.Show();
seriesToolStripMenuItem.Enabled = false;

在我的Child Form上面的代码中获得了焦点但是当我从这个新Form中的一个组合框中选择一些东西时,背景闪烁

但如果我像这样创建新表单

frSeries Serie = new frSeries();            
Serie.Opener = this;
Serie.MdiParent = this.MdiParent; //<----- this line is the problem
Serie.Show();
seriesToolStripMenuItem.Enabled = false;

子表单上方的代码没有收到焦点所以我必须单击子表单,当我从这个新表单中的一个组合框中选择一些内容后,背景不会闪烁

我不知道打开MDI表格的正确形式是什么

0 个答案:

没有答案