The bounds of the control includes the nonclient elements such as scroll bars, borders, title bars, and menus. 我需要改变clientRectangle 的大小,相应的NC的也就跟着变了,但不是整个的大小。 所以通过Bound进行设置达不到我的目的。
this.Controls[i].Size = new Size(200,200); this.Location = new Point(100,100);
To snof: 不是这个意思,不能改变整个Control的位置大小, 例如我想在Control内加一个Bevel,Bevel以内的区域才算是ClientRectangle, 该如何实现?
郁闷ing……
我需要改变clientRectangle 的大小,相应的NC的也就跟着变了,但不是整个的大小。
所以通过Bound进行设置达不到我的目的。
this.Location = new Point(100,100);
不是这个意思,不能改变整个Control的位置大小,
例如我想在Control内加一个Bevel,Bevel以内的区域才算是ClientRectangle,
该如何实现?
在Graphics中有剪切区域这个概念,可以参考一下
或者若我的控件是一个类似于Panel的容器,其内部若放置其他控件无法覆盖到Bevel上,
其实也就是NC的概念。