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

 

Sets the specified bounds of the label.

Namespace:   System.Windows.Forms
Assembly:  System.Windows.Forms (in System.Windows.Forms.dll)

protected override void SetBoundsCore(
	int x,
	int y,
	int width,
	int height,
	BoundsSpecified specified
)

Parameters

x
Type: System.Int32

The new Left property value of the control.

y
Type: System.Int32

The new Top property value of the control.

width
Type: System.Int32

The new Width property value of the control.

height
Type: System.Int32

The new Height property value of the control.

specified
Type: System.Windows.Forms.BoundsSpecified

A bitwise combination of the BoundsSpecified values. For any parameter not specified, the current value will be used.

If you set the AutoSize property to true, the label will be sized to fit the contents of the label. If you set AutoSize to false after calling the SetBoundsCore method, the label will receive the dimensions you specified in the call.

.NET Framework
Available since 1.1
Return to top
Show: