我做了一个主界面(from1)设置IsMdiContainer设为True,点击Button显示副页面(from2),将from2显示在from1里面,from1 f = new from1();
f.MdiParent = this;
f.show();完成,我想让from2在from1里只能打开一个,如何实现???
f.MdiParent = this;
f.show();完成,我想让from2在from1里只能打开一个,如何实现???
解决方案 »
- C#窗体中用户填写的信息如何如在listview中显示?
- string
- 极度郁闷的问题,高手帮忙看下啊
- 如何判断图片的完整有效性?
- 用了Develop Express 写的程序如何发布。那几个DLL应该如何搞定呢
- 为什么这样转换就是十六进制
- C#中如何把两个数据库中的两个结构一样的表合并成一个?
- smtp 发邮件的问题
- 用 OleDbCommand 如何返回 DataTable? 不要返回 DataView ,因为 DataView 没有实现 iCollection 接口,用 DataGrid 显示会有问题
- C# asp.net 2.0 正则查找符合条件的多组字符串
- mapx电子地图怎样怎样改变某个点图元的颜色
Form2:
private static from2 _instance;
public static from2 Instance()
{
if (_instance == null)
_instance = new from2();
else
_instance.Activate();
return _instance;
}
Form1:
Form2 frm = Form2.Instance();
frm .MdiParent = this;
frm .show();
为了防止混淆,最好好Form2的构造函数设成私有的