Form.AllowTransparency Form.AllowTransparency Form.AllowTransparency Form.AllowTransparency Property

定义

获取或设置一个值,该值指示能否调整窗体的不透明度。Gets or sets a value indicating whether the opacity of the form can be adjusted.

public:
 property bool AllowTransparency { bool get(); void set(bool value); };
[System.ComponentModel.Browsable(false)]
public bool AllowTransparency { get; set; }
member this.AllowTransparency : bool with get, set
Public Property AllowTransparency As Boolean

属性值

如果可以更改窗体的不透明度,则为 true;否则为 falsetrue if the opacity of the form can be changed; otherwise, false.

注解

如果更改了 Opacity,则此属性将自动设置为 trueThis property is automatically set to true if the Opacity is changed. 当使用 Opacity 属性设置窗体的不透明度时,窗体将对窗体上的对象进行分层。When the opacity of a form is set using the Opacity property, the form will layer objects on the form. 如果将 AllowTransparency 属性设置为 false,则窗体将不会处于分层模式,这将提高窗体的显示性能。If you set the AllowTransparency property to false the form will not be in layered mode which will improve the display performance of the form.

适用于