BoundsSpecified Enumeration
.NET Framework (current version)
Specifies the bounds of the control to use when defining a control's size and position.
This enumeration has a FlagsAttribute attribute that allows a bitwise combination of its member values.
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
| Member name | Description | |
|---|---|---|
| All | ||
| Height | The height of the control is defined. | |
| Location | Both X and Y coordinates of the control are defined. | |
| None | No bounds are specified. | |
| Size | ||
| Width | The width of the control is defined. | |
| X | The left edge of the control is defined. | |
| Y | The top edge of the control is defined. |
Use the members of this enumeration when calling the SetBoundsCore and SetBounds methods of the Control class.
private: void MyForm_Layout( Object^ /*sender*/, System::Windows::Forms::LayoutEventArgs^ /*e*/ ) { // Center the Form on the user's screen everytime it requires a Layout. this->SetBounds( (Screen::GetBounds( this ).Width / 2) - (this->Width / 2), (Screen::GetBounds( this ).Height / 2) - (this->Height / 2), this->Width, this->Height, BoundsSpecified::Location ); }
.NET Framework
Available since 1.1
Available since 1.1
Show: