Control.SetBoundsCore Method (Int32, Int32, Int32, Int32, BoundsSpecified)
Performs the work of setting the specified bounds of this control.
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
abstract SetBoundsCore : x:int * y:int * width:int * height:int * specified:BoundsSpecified -> unit override SetBoundsCore : x:int * y:int * width:int * height:int * specified:BoundsSpecified -> unit
Typically, the parameters that correspond to the bounds not included in the specified parameter are passed in with their current values. For example, the Height, Width, or the X or Y properties of the Location property can be passed in with a reference to the current instance of the control. However all values passed in are honored and applied to the control.
The boundsSpecified parameter represents the elements of the controls Bounds changed by your application. For example, if you change the Size of the control, the boundsSpecified parameter value is the Size value of BoundsSpecified. However, if the Size is adjusted in response to the Dock property being set, the boundsSpecified parameter value is the None value of BoundsSpecified.
On Windows Server 2003 systems, the size of a Form is restricted by the maximum pixel width and height of the monitor.
Notes to Inheritors:
When overridingin a derived class, be sure to call the base class's method to force the bounds of the control to change. Derived classes can add size restrictions to the method.
The following code example overrides the Control class.method to ensure that the control remains a fixed size. This example requires that you have a class that is either directly or indirectly derived from the
Available since 1.1