MDI窗体中打开子窗体时 如何让子窗体的位置固定? 打开的时候判断一下for(int i=0; i<MDIChildren.Count; i++){ if()..... { frm.Show(); }} 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 在子窗口中写代码:this.StartPosition = Manual;//这一句必须要有this.Location = new Point(X, Y); public static Form QueryChildForm(Form MdiForm,Type MdiChildType) { foreach (Form Child in MdiForm.MdiChildren) { //如果有这个类型的窗口 把它返回去 if (MdiChildType.Equals(Child.GetType())) { return Child; } } return null; } private void button1_Click(object sender, System.EventArgs e) { FormC fc = QueryChildForm(this,typeof(FormC)) as FormC; if(fc !=null) { fc = new FormC(); fc.MdiParent=this; fc.Show(); } else { fc.Show(); } } 新增、删除、修改记录后,ListBox为什么不刷新 怎样查看有哪些进程锁定了某个文件,怎样解锁这个文件呢 为什么我用VoiceAge的不同值都得到相同的声音,是不是没安装什么东西? 江湖救急 IIS问题??? WinFrom控件的数据绑定和空值验证 sidebar控件如何添加组的成员 按钮事件问题 winform如果先加载控件,然后加载数据? 怎么在自己的电脑上,构建一个网站,就和虚拟主机上的一样,请帮忙解决一下,给个详细步骤,非常感谢!! C# 如何将一个窗口中方法获取的数据传递到另一个窗口使用 请教个菜问题!怎样用VS.NET2003合作开发一个项目??? 如何前置指定窗口?
this.StartPosition = Manual;//这一句必须要有
this.Location = new Point(X, Y);
{
foreach (Form Child in MdiForm.MdiChildren)
{
//如果有这个类型的窗口 把它返回去
if (MdiChildType.Equals(Child.GetType()))
{
return Child;
}
}
return null;
}
private void button1_Click(object sender, System.EventArgs e)
{
FormC fc = QueryChildForm(this,typeof(FormC)) as FormC;
if(fc !=null)
{
fc = new FormC();
fc.MdiParent=this;
fc.Show();
}
else
{
fc.Show();
} }