Control.ScaleControl(SizeF, BoundsSpecified) 方法

定義

縮放控制項的位置、大小、邊框間距和邊界。Scales a control's location, size, padding and margin.

protected:
 virtual void ScaleControl(System::Drawing::SizeF factor, System::Windows::Forms::BoundsSpecified specified);
protected virtual void ScaleControl (System.Drawing.SizeF factor, System.Windows.Forms.BoundsSpecified specified);
abstract member ScaleControl : System.Drawing.SizeF * System.Windows.Forms.BoundsSpecified -> unit
override this.ScaleControl : System.Drawing.SizeF * System.Windows.Forms.BoundsSpecified -> unit
Protected Overridable Sub ScaleControl (factor As SizeF, specified As BoundsSpecified)

參數

factor
SizeF

控制項高度與寬度的縮放比例。The factor by which the height and width of the control will be scaled.

specified
BoundsSpecified

BoundsSpecified 值,指定在定義控制項的大小和位置時所用的控制項範圍。A BoundsSpecified value that specifies the bounds of the control to use when defining its size and position.

範例

BoundsSpecified

Scale

GetScaledBounds

SetBoundsCore

備註

如果控制項是最上層,這不會調整控制項的位置。If the control is top level, this will not scale the control's location. 這不會調整子系或自動調整大小控制項的大小。This does not scale children or the size of automatically sized controls. 您可以藉由變更 specified 參數的值,省略任何方向的相應縮小。You can omit scaling in any direction by changing the value of the specified parameter.

適用於