Label.SetBoundsCore(Int32, Int32, Int32, Int32, BoundsSpecified) Label.SetBoundsCore(Int32, Int32, Int32, Int32, BoundsSpecified) Label.SetBoundsCore(Int32, Int32, Int32, Int32, BoundsSpecified) Label.SetBoundsCore(Int32, Int32, Int32, Int32, BoundsSpecified) Method

定義

設定標籤的指定範圍。Sets the specified bounds of the label.

protected:
 override void SetBoundsCore(int x, int y, int width, int height, System::Windows::Forms::BoundsSpecified specified);
protected override void SetBoundsCore (int x, int y, int width, int height, System.Windows.Forms.BoundsSpecified specified);
override this.SetBoundsCore : int * int * int * int * System.Windows.Forms.BoundsSpecified -> unit
Protected Overrides Sub SetBoundsCore (x As Integer, y As Integer, width As Integer, height As Integer, specified As BoundsSpecified)

參數

x
Int32 Int32 Int32 Int32

控制項的新 Left 屬性值。The new Left property value of the control.

y
Int32 Int32 Int32 Int32

控制項的新 Top 屬性值。The new Top property value of the control.

width
Int32 Int32 Int32 Int32

控制項的新 Width 屬性值。The new Width property value of the control.

height
Int32 Int32 Int32 Int32

控制項的新 Height 屬性值。The new Height property value of the control.

specified
BoundsSpecified BoundsSpecified BoundsSpecified BoundsSpecified

BoundsSpecified 值的位元組合。A bitwise combination of the BoundsSpecified values. 任何未指定的參數會使用目前的值。For any parameter not specified, the current value will be used.

備註

如果您將AutoSize屬性設定為true,標籤將會調整大小以符合標籤的內容。If you set the AutoSize property to true, the label will be sized to fit the contents of the label. 如果您在AutoSize呼叫false SetBoundsCore方法之後將設定為,則標籤會接收您在呼叫中指定的維度。If you set AutoSize to false after calling the SetBoundsCore method, the label will receive the dimensions you specified in the call.

適用於