Control.ScaleControl(SizeF, BoundsSpecified) Control.ScaleControl(SizeF, BoundsSpecified) Control.ScaleControl(SizeF, BoundsSpecified) Control.ScaleControl(SizeF, BoundsSpecified) Method

定義

縮放控制項的位置、大小、邊框間距和邊界。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 SizeF SizeF SizeF

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

specified
BoundsSpecified BoundsSpecified BoundsSpecified 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.

適用於