RectangleShape Class

 

Represents a control displayed as a square, rectangle, rounded square, or rounded rectangle.

Namespace:   Microsoft.VisualBasic.PowerPacks
Assembly:  Microsoft.VisualBasic.PowerPacks.Vs (in Microsoft.VisualBasic.PowerPacks.Vs.dll)


[ToolboxBitmapAttribute((RectangleShape^::typeid), "Microsoft.VisualBasic.PowerPacks.RectangleShape.bmp")]
public ref class RectangleShape : SimpleShape

NameDescription
System_CAPS_pubmethodRectangleShape()

Initializes a new instance of the RectangleShape class.

System_CAPS_pubmethodRectangleShape(Int32, Int32, Int32, Int32)

Initializes a new instance of the RectangleShape class, specifying its location and size.

System_CAPS_pubmethodRectangleShape(ShapeContainer^)

Initializes a new instance of the RectangleShape class, specifying the ShapeContainer that will contain it.

NameDescription
System_CAPS_pubpropertyAccessibilityObject

Gets the AccessibleObject that is assigned to the control.(Inherited from Shape.)

System_CAPS_pubpropertyAccessibleDefaultActionDescription

Gets or sets the default action description of the control for use by accessibility client applications.(Inherited from Shape.)

System_CAPS_pubpropertyAccessibleDescription

Gets or sets the description of the control that is used by accessibility client applications.(Inherited from Shape.)

System_CAPS_pubpropertyAccessibleName

Gets or sets the name of the control that is used by accessibility client applications.(Inherited from Shape.)

System_CAPS_pubpropertyAccessibleRole

Gets or sets the accessible role of the control.(Inherited from Shape.)

System_CAPS_pubpropertyAnchor

Gets or sets the edges of the container to which a shape is bound, and determines how a shape is resized when its parent is resized.(Inherited from Shape.)

System_CAPS_pubpropertyBackColor

Gets or sets the background color for the shape.(Inherited from SimpleShape.)

System_CAPS_pubpropertyBackgroundImage

Gets or sets the image displayed in the shape.(Inherited from SimpleShape.)

System_CAPS_pubpropertyBackgroundImageLayout

Gets or sets the background image layout as defined in the ImageLayout enumeration.(Inherited from SimpleShape.)

System_CAPS_pubpropertyBackStyle

Gets or sets the transparency of the shape.(Inherited from SimpleShape.)

System_CAPS_pubpropertyBorderColor

Gets or sets the color of the border of a shape or line control.(Inherited from Shape.)

System_CAPS_pubpropertyBorderStyle

Gets or sets the border style for a shape or line control. (Inherited from Shape.)

System_CAPS_pubpropertyBorderWidth

Gets or sets the width of the shape control's border.(Inherited from SimpleShape.)

System_CAPS_pubpropertyBottom

Gets the distance, in pixels, between the bottom edge of the shape and the top edge of its container's client area.(Inherited from SimpleShape.)

System_CAPS_pubpropertyBounds

Gets or sets the size and location of the shape in pixels, relative to the parent control.(Inherited from SimpleShape.)

System_CAPS_pubpropertyCanFocus

Gets a value indicating whether a line or shape control can receive focus.(Inherited from Shape.)

System_CAPS_protpropertyCanRaiseEvents

(Inherited from Component.)

System_CAPS_pubpropertyCanSelect

Gets a value indicating whether a line or shape control can be selected.(Inherited from Shape.)

System_CAPS_pubpropertyClientRectangle

Gets the rectangle that represents the client area of the shape.(Inherited from SimpleShape.)

System_CAPS_pubpropertyClientSize

Gets or sets the height and width of the client area of the shape.(Inherited from SimpleShape.)

System_CAPS_pubpropertyContainer

Gets the IContainer that contains the Component.(Inherited from Shape.)

System_CAPS_pubpropertyContainsFocus

Gets a value indicating whether a line or shape control currently has the input focus.(Inherited from Shape.)

System_CAPS_pubpropertyContextMenu

Gets or sets the shortcut menu associated with a line or shape control.(Inherited from Shape.)

System_CAPS_pubpropertyContextMenuStrip

Gets or sets the ContextMenuStrip associated with a line or shape control.(Inherited from Shape.)

System_CAPS_pubpropertyCornerRadius

Gets or sets the radius for the corners of rounded rectangle and rounded square shapes.

System_CAPS_pubpropertyCreated

Gets a value indicating whether a line or shape control has been created.(Inherited from Shape.)

System_CAPS_pubpropertyCursor

Gets or sets the cursor that is displayed when the mouse pointer is resting on a line or shape control.(Inherited from Shape.)

System_CAPS_protpropertyDesignMode

(Inherited from Component.)

System_CAPS_pubpropertyDisplayRectangle

Gets the rectangle that represents the display area of the shape.(Inherited from SimpleShape.)

System_CAPS_pubpropertyDisposing

Gets a value indicating whether the base Shape class is disposing.(Inherited from Shape.)

System_CAPS_pubpropertyEnabled

Gets or sets a value indicating whether a line or shape control can respond to user interaction.(Inherited from Shape.)

System_CAPS_protpropertyEvents

(Inherited from Component.)

System_CAPS_pubpropertyFillColor

Gets or sets the color that is used to fill the shape.(Inherited from SimpleShape.)

System_CAPS_pubpropertyFillGradientColor

Gets or sets the gradient color that is used to fill the shape.(Inherited from SimpleShape.)

System_CAPS_pubpropertyFillGradientStyle

Gets or sets the gradient style that is used to fill the shape.(Inherited from SimpleShape.)

System_CAPS_pubpropertyFillStyle

Gets or sets the pattern used to fill the shape.(Inherited from SimpleShape.)

System_CAPS_pubpropertyFocused

Gets a value indicating whether a line or shape control currently has the input focus.(Inherited from Shape.)

System_CAPS_pubpropertyHeight

Gets or sets the height of the shape.(Inherited from SimpleShape.)

System_CAPS_pubpropertyIsAccessible

Gets or sets a value indicating whether a line or shape control is available to accessibility applications.(Inherited from Shape.)

System_CAPS_pubpropertyIsDisposed

Gets a value indicating whether a line or shape control has been disposed of.(Inherited from Shape.)

System_CAPS_pubpropertyLeft

Gets or sets the distance, in pixels, between the left edge of the shape and the left edge of its container's client area.(Inherited from SimpleShape.)

System_CAPS_pubpropertyLocation

Gets or sets the coordinates of the upper-left corner of the shape relative to the upper-left corner of its container.(Inherited from SimpleShape.)

System_CAPS_pubpropertyName

Gets or sets the name of a line or shape control.(Inherited from Shape.)

System_CAPS_pubpropertyParent

Gets or sets the parent container of a line or shape control.(Inherited from Shape.)

System_CAPS_pubpropertyRegion

Gets or sets the window region associated with a line or shape control.(Inherited from Shape.)

System_CAPS_pubpropertyRight

Gets the distance, in pixels, between the right edge of the shape and the left edge of its container's client area.(Inherited from SimpleShape.)

System_CAPS_pubpropertySelectionColor

Gets or sets the selection color of a shape.(Inherited from Shape.)

System_CAPS_pubpropertySite

(Inherited from Component.)

System_CAPS_pubpropertySize

Gets or sets the height and width of the shape.(Inherited from SimpleShape.)

System_CAPS_pubpropertyTag

Gets or sets the object that contains data about a line or shape control.(Inherited from Shape.)

System_CAPS_pubpropertyTop

Gets or sets the distance, in pixels, between the top edge of the shape and the left edge of its container's client area.(Inherited from SimpleShape.)

System_CAPS_pubpropertyUseWaitCursor

Gets or sets a value indicating whether to use the wait cursor for the current line or shape control.(Inherited from Shape.)

System_CAPS_pubpropertyVisible

Gets or sets a value indicating whether a line or shape control is displayed.(Inherited from Shape.)

System_CAPS_pubpropertyWidth

Gets or sets the width of the shape.(Inherited from SimpleShape.)

NameDescription
System_CAPS_pubmethodBringToFront()

Brings a line or shape control to the front of the z-order.(Inherited from Shape.)

System_CAPS_protmethodCreateAccessibilityInstance()

Creates a new accessibility object for the shape control.(Inherited from SimpleShape.)

System_CAPS_pubmethodCreateObjRef(Type^)

(Inherited from MarshalByRefObject.)

System_CAPS_pubmethodDispose()

(Inherited from Component.)

System_CAPS_protmethodDispose(Boolean)

Releases the unmanaged resources used by a line or shape control and optionally releases the managed resources.(Inherited from Shape.)

System_CAPS_pubmethodDrawToBitmap(Bitmap^, Rectangle)

Supports rendering to the specified bitmap.(Inherited from SimpleShape.)

System_CAPS_pubmethodEquals(Object^)

(Inherited from Object.)

System_CAPS_protmethodFinalize()

(Inherited from Component.)

System_CAPS_pubmethodFindForm()

Retrieves the form that a line or shape control is on.(Inherited from Shape.)

System_CAPS_pubmethodFocus()

Sets input focus to a line or shape control.(Inherited from Shape.)

System_CAPS_pubmethodGetContainerControl()

Returns the next ContainerControl up in a line or shape control's chain of parent controls.(Inherited from Shape.)

System_CAPS_pubmethodGetHashCode()

(Inherited from Object.)

System_CAPS_pubmethodGetLifetimeService()

(Inherited from MarshalByRefObject.)

System_CAPS_protmethodGetService(Type^)

(Inherited from Component.)

System_CAPS_pubmethodGetType()

(Inherited from Object.)

System_CAPS_pubmethodHide()

Conceals a line or shape control from the user.(Inherited from Shape.)

System_CAPS_pubmethodHitTest(Int32, Int32)

Determines whether a shape control is located at the specified point on the screen.(Inherited from SimpleShape.)

System_CAPS_pubmethodInitializeLifetimeService()

(Inherited from MarshalByRefObject.)

System_CAPS_pubmethodInvalidate()

Invalidates a specific region of a line or shape control and causes a paint message to be sent to the control.(Inherited from Shape.)

System_CAPS_protmethodMemberwiseClone()

(Inherited from Object.)

System_CAPS_protmethodMemberwiseClone(Boolean)

(Inherited from MarshalByRefObject.)

System_CAPS_protmethodOnBackColorChanged(EventArgs^)

Raises the BackColorChanged event.(Inherited from SimpleShape.)

System_CAPS_protmethodOnBackgroundImageChanged(EventArgs^)

Raises the BackgroundImageChanged event.(Inherited from SimpleShape.)

System_CAPS_protmethodOnBackgroundImageLayoutChanged(EventArgs^)

Raises the BackgroundImageLayoutChanged event.(Inherited from SimpleShape.)

System_CAPS_protmethodOnClick(EventArgs^)

Raises the Click event.(Inherited from Shape.)

System_CAPS_protmethodOnClientSizeChanged(EventArgs^)

Raises the ClientSizeChanged event.(Inherited from SimpleShape.)

System_CAPS_protmethodOnContextMenuChanged(EventArgs^)

Raises the ContextMenuChanged event.(Inherited from Shape.)

System_CAPS_protmethodOnContextMenuStripChanged(EventArgs^)

Raises the ContextMenuStripChanged event.(Inherited from Shape.)

System_CAPS_protmethodOnCursorChanged(EventArgs^)

Raises the CursorChanged event.(Inherited from Shape.)

System_CAPS_protmethodOnDoubleClick(EventArgs^)

Raises the DoubleClick event.(Inherited from Shape.)

System_CAPS_protmethodOnEnabledChanged(EventArgs^)

Raises the EnabledChanged event.(Inherited from Shape.)

System_CAPS_protmethodOnEnter(EventArgs^)

Raises the Enter event.(Inherited from Shape.)

System_CAPS_protmethodOnGotFocus(EventArgs^)

Raises the GotFocus event.(Inherited from Shape.)

System_CAPS_protmethodOnInvalidated(InvalidateEventArgs^)

Raises the Invalidated event.(Inherited from Shape.)

System_CAPS_protmethodOnKeyDown(KeyEventArgs^)

Raises the KeyDown event.(Inherited from Shape.)

System_CAPS_protmethodOnKeyPress(KeyPressEventArgs^)

Raises the KeyPress event.(Inherited from Shape.)

System_CAPS_protmethodOnKeyUp(KeyEventArgs^)

Raises the KeyUp event.(Inherited from Shape.)

System_CAPS_protmethodOnLeave(EventArgs^)

Raises the Leave event.(Inherited from Shape.)

System_CAPS_protmethodOnLocationChanged(EventArgs^)

Raises the LocationChanged event.(Inherited from SimpleShape.)

System_CAPS_protmethodOnLostFocus(EventArgs^)

Raises the LostFocus event.(Inherited from Shape.)

System_CAPS_protmethodOnMouseClick(MouseEventArgs^)

Raises the MouseClick event.(Inherited from Shape.)

System_CAPS_protmethodOnMouseDoubleClick(MouseEventArgs^)

Raises the MouseDoubleClick event.(Inherited from Shape.)

System_CAPS_protmethodOnMouseDown(MouseEventArgs^)

Raises the MouseDown event.(Inherited from Shape.)

System_CAPS_protmethodOnMouseEnter(EventArgs^)

Raises the MouseEnter event.(Inherited from Shape.)

System_CAPS_protmethodOnMouseHover(EventArgs^)

Raises the MouseHover event.(Inherited from Shape.)

System_CAPS_protmethodOnMouseLeave(EventArgs^)

Raises the MouseLeave event.(Inherited from Shape.)

System_CAPS_protmethodOnMouseMove(MouseEventArgs^)

Raises the MouseMove event.(Inherited from Shape.)

System_CAPS_protmethodOnMouseUp(MouseEventArgs^)

Raises the MouseUp event.(Inherited from Shape.)

System_CAPS_protmethodOnMouseWheel(MouseEventArgs^)

Raises the MouseWheel event.(Inherited from Shape.)

System_CAPS_protmethodOnMove(EventArgs^)

Raises the Move event.(Inherited from Shape.)

System_CAPS_protmethodOnPaint(PaintEventArgs^)

Raises the Paint event.(Inherited from SimpleShape.)

System_CAPS_protmethodOnParentChanged(EventArgs^)

Raises the ParentChanged event.(Inherited from Shape.)

System_CAPS_protmethodOnPreviewKeyDown(PreviewKeyDownEventArgs^)

Raises the PreviewKeyDown event.(Inherited from Shape.)

System_CAPS_protmethodOnQueryAccessibilityHelp(QueryAccessibilityHelpEventArgs^)

Raises the QueryAccessibilityHelp event.(Inherited from Shape.)

System_CAPS_protmethodOnRegionChanged(EventArgs^)

Raises the RegionChanged event.(Inherited from Shape.)

System_CAPS_protmethodOnResize(EventArgs^)

Raises the Resize event.(Inherited from SimpleShape.)

System_CAPS_protmethodOnSizeChanged(EventArgs^)

Raises the SizeChanged event.(Inherited from SimpleShape.)

System_CAPS_protmethodOnVisibleChanged(EventArgs^)

Raises the VisibleChanged event.(Inherited from Shape.)

System_CAPS_pubmethodPointToClient(Point)

Computes the location of the specified screen point into client coordinates.(Inherited from Shape.)

System_CAPS_pubmethodPointToScreen(Point)

Computes the location of the specified client point into screen coordinates.(Inherited from Shape.)

System_CAPS_pubmethodRectangleToClient(Rectangle)

Computes the size and location of the specified screen rectangle in client coordinates.(Inherited from Shape.)

System_CAPS_pubmethodRectangleToScreen(Rectangle)

Computes the size and location of the specified client rectangle in screen coordinates.(Inherited from Shape.)

System_CAPS_pubmethodRefresh()

Forces a control to invalidate its client area and immediately redraw itself and any child controls.(Inherited from Shape.)

System_CAPS_pubmethodResumePaint(Boolean)

Resumes usual painting logic, optionally forcing an immediate layout of pending paint requests.(Inherited from Shape.)

System_CAPS_pubmethodScale(SizeF)

Scales the shape by the specified scaling factor.(Inherited from SimpleShape.)

System_CAPS_pubmethodSelect()

Enables a control.(Inherited from Shape.)

System_CAPS_pubmethodSendToBack()

Sends a line or shape control to the back of the z-order.(Inherited from Shape.)

System_CAPS_pubmethodSetBounds(Int32, Int32, Int32, Int32)

Sets the bounds of the shape to the specified location and size.(Inherited from SimpleShape.)

System_CAPS_pubmethodShow()

Displays a shape to the user.(Inherited from Shape.)

System_CAPS_pubmethodSuspendPaint()

Suspends the painting logic for a shape.(Inherited from Shape.)

System_CAPS_pubmethodToString()

(Inherited from Component.)

System_CAPS_pubmethodUpdate()

Causes the control to redraw the invalidated regions within its client area.(Inherited from Shape.)

NameDescription
System_CAPS_pubeventBackColorChanged

Occurs when the BackColor property of the shape is changed.(Inherited from SimpleShape.)

System_CAPS_pubeventBackgroundImageChanged

Occurs when the BackgroundImage property of a shape is changed.(Inherited from SimpleShape.)

System_CAPS_pubeventBackgroundImageLayoutChanged

Occurs when the BackgroundImageLayout property of a shape is changed.(Inherited from SimpleShape.)

System_CAPS_pubeventChangeUICues

Occurs when the focus or keyboard user interface (UI) cues change.(Inherited from Shape.)

System_CAPS_pubeventClick

Occurs when the shape is clicked.(Inherited from Shape.)

System_CAPS_pubeventClientSizeChanged

Occurs when the ClientSize property of a shape is changed.(Inherited from SimpleShape.)

System_CAPS_pubeventContextMenuChanged

Occurs when the value of the ContextMenu property changes.(Inherited from Shape.)

System_CAPS_pubeventContextMenuStripChanged

Occurs when the value of the ContextMenuStrip property changes.(Inherited from Shape.)

System_CAPS_pubeventCursorChanged

Occurs when the value of the Cursor property changes.(Inherited from Shape.)

System_CAPS_pubeventDisposed

(Inherited from Component.)

System_CAPS_pubeventDoubleClick

Occurs when the shape is double-clicked.(Inherited from Shape.)

System_CAPS_pubeventEnabledChanged

Occurs when the Enabled property value has changed.(Inherited from Shape.)

System_CAPS_pubeventEnter

Occurs when the shape is entered.(Inherited from Shape.)

System_CAPS_pubeventGotFocus

Occurs when the shape receives focus.(Inherited from Shape.)

System_CAPS_pubeventInvalidated

Occurs when a shape's display requires redrawing.(Inherited from Shape.)

System_CAPS_pubeventKeyDown

Occurs when a key is pressed and the shape has focus.(Inherited from Shape.)

System_CAPS_pubeventKeyPress

Occurs when a key is pressed and the shape has focus.(Inherited from Shape.)

System_CAPS_pubeventKeyUp

Occurs when a key is released and the shape has focus.(Inherited from Shape.)

System_CAPS_pubeventLeave

Occurs when the input focus leaves the shape.(Inherited from Shape.)

System_CAPS_pubeventLocationChanged

Occurs when the Location property of a shape is changed.(Inherited from SimpleShape.)

System_CAPS_pubeventLostFocus

Occurs when the shape loses focus.(Inherited from Shape.)

System_CAPS_pubeventMouseClick

Occurs when the shape is clicked by the mouse.(Inherited from Shape.)

System_CAPS_pubeventMouseDoubleClick

Occurs when the shape is double-clicked by the mouse.(Inherited from Shape.)

System_CAPS_pubeventMouseDown

Occurs when the mouse pointer is over the shape and a mouse button is pressed.(Inherited from Shape.)

System_CAPS_pubeventMouseEnter

Occurs when the mouse pointer enters the shape.(Inherited from Shape.)

System_CAPS_pubeventMouseHover

Occurs when the mouse pointer rests on the shape.(Inherited from Shape.)

System_CAPS_pubeventMouseLeave

Occurs when the mouse pointer leaves the shape. (Inherited from Shape.)

System_CAPS_pubeventMouseMove

Occurs when the mouse pointer is moved over the shape.(Inherited from Shape.)

System_CAPS_pubeventMouseUp

Occurs when the mouse pointer is over the shape and a mouse button is released.(Inherited from Shape.)

System_CAPS_pubeventMouseWheel

Occurs when the mouse wheel moves and the shape has focus.(Inherited from Shape.)

System_CAPS_pubeventMove

Occurs when the shape is moved.(Inherited from Shape.)

System_CAPS_pubeventPaint

Occurs when the shape is redrawn.(Inherited from Shape.)

System_CAPS_pubeventParentChanged

Occurs when the Parent property value changes.(Inherited from Shape.)

System_CAPS_pubeventPreviewKeyDown

Occurs before the KeyDown event when a key is pressed and focus is on the shape.(Inherited from Shape.)

System_CAPS_pubeventQueryAccessibilityHelp

Occurs when an AccessibleObject is providing Help to accessibility applications. (Inherited from Shape.)

System_CAPS_pubeventRegionChanged

Occurs when the value of the Region property changes.(Inherited from Shape.)

System_CAPS_pubeventResize

Occurs when the size of a shape is changed.(Inherited from SimpleShape.)

System_CAPS_pubeventSizeChanged

Occurs when the Size property of a shape is changed.(Inherited from SimpleShape.)

System_CAPS_pubeventVisibleChanged

Occurs when the Visible property value changes.(Inherited from Shape.)

The RectangleShape control enables you to draw rectangles on a form or container at design time or run time.

When you add a Line or Shape control to a form or container, an invisible ShapeContainer object is created. The ShapeContainer acts as a drawing surface for the shapes within each container control. Each ShapeContainer has a corresponding ShapeCollection that enables you to iterate through the Line and Shape controls that are contained in the ShapeContainer.

When you create a RectangleShape control at run time, you must also create a ShapeContainer and set the Parent property of the RectangleShape to the ShapeContainer.

The following example creates a ShapeContainer and a RectangleShape, adds them to a form, and displays a rectangle.

No code example is currently available or this language may not be supported.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Return to top
Show: