Sets the bounds of the element to the position and size of the bounding rectangle of the specified dimensions.
Syntax
Parameters
- x
- X-coordinate for bounding rectangle's top-left corner
- y
- Y-coordinate for bounding rectangle's top-left corner
- width
- Width of bounding rectangle in pixels
- height
- Height of bounding rectangle in pixels
Example
This example shows the use of this member by setting the bounds of the control to the specified location and size, using integer values.
C# | Copy Code |
---|
control.Text = "NO SMOKING";
control.ForeColor = Color.Red;
control.TextOrientation = FarPoint.Win.TextOrientation.TextVertical;
control.Picture = Image.FromFile(Application.StartupPath + "\\smokes.bmp", true)
control.AlignText = FarPoint.Win.TextAlign.TextLeftPictRight;
control.AlignHorz = FarPoint.Win.HorizontalAlignment.Center;
control.SetBounds(10, 50, 300, 250);
|
Visual Basic | Copy Code |
---|
control.Text = "NO SMOKING"
control.ForeColor = Color.Red
control.TextOrientation = FarPoint.Win.TextOrientation.TextVertical
control.Picture = Image.FromFile(Application.StartupPath & "\smokes.bmp", True)
control.AlignText = FarPoint.Win.TextAlign.TextLeftPictRight
control.AlignHorz = FarPoint.Win.HorizontalAlignment.Center
control.SetBounds(10, 50, 300, 250)
|
Requirements
Target Platforms: Windows 2000 Professional (SP4), Windows 2000 Server, Windows 2003 Server (SP1), Windows 2008, Windows XP (SP2), Windows Vista, Windows 7, Windows 8
See Also