Control.RecreateHandle 方法

定义

强制为控件重新创建句柄。

C#
protected void RecreateHandle();

注解

每当新控件需要参数时,将 RecreateHandle 调用 方法,但使用 从 UpdateStylesCreateParams 的调用是不够的。 此方法还调用 DestroyHandle 和 并将 CreateHandle 设置为 RecreatingHandletrue

适用于

产品 版本
.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, 10

另请参阅