Form.AutoScale 屬性

定義

警告

This property has been deprecated. Use the AutoScaleMode property instead. http://go.microsoft.com/fwlink/?linkid=14202

警告

This property has been deprecated. Use the AutoScaleMode property instead. https://go.microsoft.com/fwlink/?linkid=14202

取得或設定值,指出表單是否要調整大小以配合表單上所使用的字型高度,並且縮放它的控制項。

public:
 property bool AutoScale { bool get(); void set(bool value); };
public bool AutoScale { get; set; }
[System.ComponentModel.Browsable(false)]
[System.Obsolete("This property has been deprecated. Use the AutoScaleMode property instead.  http://go.microsoft.com/fwlink/?linkid=14202")]
public bool AutoScale { get; set; }
[System.ComponentModel.Browsable(false)]
[System.Obsolete("This property has been deprecated. Use the AutoScaleMode property instead.  https://go.microsoft.com/fwlink/?linkid=14202")]
public bool AutoScale { get; set; }
member this.AutoScale : bool with get, set
[<System.ComponentModel.Browsable(false)>]
[<System.Obsolete("This property has been deprecated. Use the AutoScaleMode property instead.  http://go.microsoft.com/fwlink/?linkid=14202")>]
member this.AutoScale : bool with get, set
[<System.ComponentModel.Browsable(false)>]
[<System.Obsolete("This property has been deprecated. Use the AutoScaleMode property instead.  https://go.microsoft.com/fwlink/?linkid=14202")>]
member this.AutoScale : bool with get, set
Public Property AutoScale As Boolean

屬性值

如果表單根據指派給表單的目前字型自動縮放表單本身及其控制項,則為 true,否則為 false。 預設為 true

屬性

備註

重要

AutoScale已過時,並已保留供回溯相容性使用。 非過時的替代方式是 ContainerControl.AutoScaleMode。 如需自動調整的詳細資訊,請參閱自動調整Windows Forms

您可以使用這個屬性來允許表單及其控制項根據字型中的變更自動調整。 這在字型可能會根據 Windows 所指定語言而增加或減少的應用程式中很有用。

若要取得表單將自動調整的大小,請使用 AutoScaleBaseSize 屬性。 如果您想要判斷表單會根據特定字型自動調整的大小,請使用 GetAutoScaleSize 方法。

適用於