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.

适用于