如何获取表格的内部宽度和高度 [英] How to obtain form's inner width and height
本文介绍了如何获取表格的内部宽度和高度的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
按标题.
我正在编写一个程序,所有组件都可以根据表单的大小自动调整大小.
I am writing a program that all components can adjust size automatically by form's size.
当我使用this.Width
和this.Height
属性时,其返回值是整个表单(红色框)的宽度和高度.
When I using this.Width
and this.Height
properties, its return value is the width and height of whole form (red frame).
如何获取表单内部区域(绿色框)的宽度和高度?
How to get the form's width and height of its inner area (green frame)?
推荐答案
使用this.ClientSize.Width
和this.ClientSize.Height
.
http://msdn.microsoft.com/en-us/library/9278sfx2(v = vs.110).aspx
这篇关于如何获取表格的内部宽度和高度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文