Sets the bounds of the element to the position and size of the specified bounding rectangle object.
Syntax
Visual Basic (Declaration) | |
---|
Public Overloads Overridable Sub SetBounds( _
ByVal rectInput As Rectangle _
) |
Visual Basic (Usage) | Copy Code |
---|
Dim instance As ElementControl
Dim rectInput As Rectangle
instance.SetBounds(rectInput) |
Parameters
- rectInput
- Rectangle object that provides the boundaries for the control
Remarks
Example
This example shows the use of this member by setting the bounds of the control to the specified position and size using a rectangle structure.
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;
Rectangle rect = new Rectangle(10,50,200,150);
control.SetBounds(rect);
|
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 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
See Also