Control.Scale 方法

多載

 Scale(SizeF) 根據指定的縮放比例來縮放控制項和所有子控制項。Scales the control and all child controls by the specified scaling factor. Scale(Single) 已過時。 縮放控制項和任何的子控制項。Scales the control and any child controls. Scale(Single, Single) 已過時。 縮放整個控制項和任何的子控制項。Scales the entire control and any child controls.

Scale(SizeF)

``````public:
void Scale(System::Drawing::SizeF factor);``````
``public void Scale (System.Drawing.SizeF factor);``
``member this.Scale : System.Drawing.SizeF -> unit``
``Public Sub Scale (factor As SizeF)``

參數

factor
SizeF

SizeF，包含水平和垂直縮放比例。A SizeF containing the horizontal and vertical scaling factors.

備註

Scale 方法會根據指定的縮放比例來調整控制項 `factor`The Scale method scales the control by the specified scaling `factor`. 如果 `true`ScaleChildren 屬性，它也會以遞迴方式調整所有子控制項。It also recursively scales all child controls if the ScaleChildren property is `true`. 就內部而言，這個方法會呼叫 ScaleControl 來調整每個控制項。Internally, this method calls ScaleControl to scale each control.

Scale(Single)

``````public:
void Scale(float ratio);``````
``````[System.Obsolete("This method has been deprecated. Use the Scale(SizeF ratio) method instead. http://go.microsoft.com/fwlink/?linkid=14202")]
public void Scale (float ratio);``````
``public void Scale (float ratio);``
``member this.Scale : single -> unit``
``Public Sub Scale (ratio As Single)``

ratio
Single

Scale(Single, Single)

``````public:
void Scale(float dx, float dy);``````
``````[System.Obsolete("This method has been deprecated. Use the Scale(SizeF ratio) method instead. http://go.microsoft.com/fwlink/?linkid=14202")]
public void Scale (float dx, float dy);``````
``public void Scale (float dx, float dy);``
``member this.Scale : single * single -> unit``
``Public Sub Scale (dx As Single, dy As Single)``

dx
Single

dy
Single