Control.UpdateBounds 方法

定义

更新控件的边界。

重载

UpdateBounds()

用当前大小和位置更新控件的边界。

UpdateBounds(Int32, Int32, Int32, Int32)

用指定大小和位置更新控件的边界。

UpdateBounds(Int32, Int32, Int32, Int32, Int32, Int32)

用指定大小、位置和工作区的大小更新控件的边界。

UpdateBounds()

用当前大小和位置更新控件的边界。

C#
protected void UpdateBounds ();
C#
protected internal void UpdateBounds ();

注解

如果 控件的新 Size 与上 Size一个 不同,则会 SizeChanged 引发 事件。 同样,如果 Location 控件的 更改,则会 LocationChanged 引发 事件。

另请参阅

适用于

.NET Framework 4.8.1 和其他版本
产品 版本
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9

UpdateBounds(Int32, Int32, Int32, Int32)

用指定大小和位置更新控件的边界。

C#
protected void UpdateBounds (int x, int y, int width, int height);

参数

x
Int32

控件的 X 坐标。

y
Int32

控件的 Y 坐标。

width
Int32

控件的 Width

height
Int32

控件的 Height

注解

如果 控件的新 Size (如果与上 Size一个 不同),则 SizeChanged 引发 事件。 同样, 是 Location 控件更改的 , LocationChanged 引发 事件。

另请参阅

适用于

.NET Framework 4.8.1 和其他版本
产品 版本
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9

UpdateBounds(Int32, Int32, Int32, Int32, Int32, Int32)

用指定大小、位置和工作区的大小更新控件的边界。

C#
protected void UpdateBounds (int x, int y, int width, int height, int clientWidth, int clientHeight);

参数

x
Int32

控件的 X 坐标。

y
Int32

控件的 Y 坐标。

width
Int32

控件的 Width

height
Int32

控件的 Height

clientWidth
Int32

控件的工作区的 Width

clientHeight
Int32

控件的工作区的 Height

注解

如果 控件的新 Size 与上 Size一个 不同,则会 SizeChanged 引发 事件。 同样,如果 Location 控件的 更改,则会 LocationChanged 引发 事件。

另请参阅

适用于

.NET Framework 4.8.1 和其他版本
产品 版本
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9