MDI主窗口客户区的大小怎么取值?

velen 2006-06-06 11:34:52
有一MDI主窗口,包括一菜单,一工具条和一状态条.怎样才能使新打开的MDI子窗口的大小正好填充到MDI主窗口客户区那么大.
我用this.ClientRectangle.Height-this.toolBar1.Height-this.statusBar1.Height和this.ClientRectangle.Width,不知道为什么还会大,尤其是宽度,如果再减一固定值,我怕到另外的显示器不行.
...全文
214 8 打赏 收藏 转发到动态 举报
写回复
用AI写文章
8 条回复
切换为时间正序
请发表友善的回复…
发表回复
noway8881 2006-06-13
  • 打赏
  • 举报
回复
我的意思是以平铺的方式打开子窗口.
------------------------------------
this.LayoutMdi(MdiLayout.TileHorizontal)

this.LayoutMdi(MdiLayout.TileVertical)

this.LayoutMdi(MdiLayout.Cascade)

要哪个?
velen 2006-06-12
  • 打赏
  • 举报
回复
高手近来啊/
noky 2006-06-06
  • 打赏
  • 举报
回复
楼上正解
noway8881 2006-06-06
  • 打赏
  • 举报
回复
form frm = new form();
frm.mdiparent = this;
frm.WindowState = Maximized;
frm.Show();
linaren 2006-06-06
  • 打赏
  • 举报
回复
宽度 = this.ClientRectangle.Width-(this.Bounds.Width-this.ClientRectangle.Width)
velen 2006-06-06
  • 打赏
  • 举报
回复
我的意思是以平铺的方式打开子窗口.
velen 2006-06-06
  • 打赏
  • 举报
回复
frm.WindowState = Maximized;
使用Maximized,子窗口的TITLE栏会和主窗口重合,我想要的子窗口的TITLE栏不和主窗口重合.
jijl2001 2006-06-06
  • 打赏
  • 举报
回复
WindowState = Maximized;

110,499

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 C#
社区管理员
  • C#
  • Web++
  • by_封爱
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

让您成为最强悍的C#开发者

试试用AI创作助手写篇文章吧