Поделиться через


SimpleShape Class

Implements the basic functionality that is common to OvalShape and RectangleShape controls.

Inheritance Hierarchy

System.Object
  System.MarshalByRefObject
    System.ComponentModel.Component
      Microsoft.VisualBasic.PowerPacks.Shape
        Microsoft.VisualBasic.PowerPacks.SimpleShape
          Microsoft.VisualBasic.PowerPacks.OvalShape
          Microsoft.VisualBasic.PowerPacks.RectangleShape

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

Syntax

'Declaration
Public MustInherit Class SimpleShape _
    Inherits Shape
public abstract class SimpleShape : Shape
public ref class SimpleShape abstract : public Shape
[<AbstractClass>]
type SimpleShape =  
    class
        inherit Shape
    end
public abstract class SimpleShape extends Shape

The SimpleShape type exposes the following members.

Constructors

  Name Description
Protected method SimpleShape() Initializes a new instance of the SimpleShape class.
Protected method SimpleShape(ShapeContainer) Initializes a new instance of the SimpleShape class, specifying a ShapeContainer as its parent.
Protected method SimpleShape(Int32, Int32, Int32, Int32) Initializes a new instance of the SimpleShape class, specifying its size and location.

Top

Properties

  Name Description
Public property AccessibilityObject Gets the AccessibleObject that is assigned to the control. (Inherited from Shape.)
Public property AccessibleDefaultActionDescription Gets or sets the default action description of the control for use by accessibility client applications. (Inherited from Shape.)
Public property AccessibleDescription Gets or sets the description of the control that is used by accessibility client applications. (Inherited from Shape.)
Public property AccessibleName Gets or sets the name of the control that is used by accessibility client applications. (Inherited from Shape.)
Public property AccessibleRole Gets or sets the accessible role of the control. (Inherited from Shape.)
Public property Anchor 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.)
Public property BackColor Gets or sets the background color for the shape.
Public property BackgroundImage Gets or sets the image displayed in the shape.
Public property BackgroundImageLayout Gets or sets the background image layout as defined in the ImageLayout enumeration.
Public property BackStyle Gets or sets the transparency of the shape.
Public property BorderColor Gets or sets the color of the border of a shape or line control. (Inherited from Shape.)
Public property BorderStyle Gets or sets the border style for a shape or line control. (Inherited from Shape.)
Public property BorderWidth Gets or sets the width of the shape control's border. (Overrides Shape.BorderWidth.)
Public property Bottom Gets the distance, in pixels, between the bottom edge of the shape and the top edge of its container's client area.
Public property Bounds Gets or sets the size and location of the shape in pixels, relative to the parent control.
Public property CanFocus Gets a value indicating whether a line or shape control can receive focus. (Inherited from Shape.)
Protected property CanRaiseEvents Gets a value indicating whether the component can raise an event. (Inherited from Component.)
Public property CanSelect Gets a value indicating whether a line or shape control can be selected. (Inherited from Shape.)
Public property ClientRectangle Gets the rectangle that represents the client area of the shape.
Public property ClientSize Gets or sets the height and width of the client area of the shape.
Public property Container Gets the IContainer that contains the Component. (Inherited from Shape.)
Public property ContainsFocus Gets a value indicating whether a line or shape control currently has the input focus. (Inherited from Shape.)
Public property ContextMenu Gets or sets the shortcut menu associated with a line or shape control. (Inherited from Shape.)
Public property ContextMenuStrip Gets or sets the ContextMenuStrip associated with a line or shape control. (Inherited from Shape.)
Public property Created Gets a value indicating whether a line or shape control has been created. (Inherited from Shape.)
Public property Cursor Gets or sets the cursor that is displayed when the mouse pointer is resting on a line or shape control. (Inherited from Shape.)
Public propertyStatic member DefaultBackColor Gets the default background color of the shape.
Public propertyStatic member DefaultFillColor Gets the default fill color of the shape.
Public propertyStatic member DefaultFillGradientColor Gets the default fill gradient color of the shape.
Protected property DesignMode Gets a value that indicates whether the Component is currently in design mode. (Inherited from Component.)
Public property DisplayRectangle Gets the rectangle that represents the display area of the shape.
Public property Disposing Gets a value indicating whether the base Shape class is disposing. (Inherited from Shape.)
Public property Enabled Gets or sets a value indicating whether a line or shape control can respond to user interaction. (Inherited from Shape.)
Protected property Events Gets the list of event handlers that are attached to this Component. (Inherited from Component.)
Public property FillColor Gets or sets the color that is used to fill the shape.
Public property FillGradientColor Gets or sets the gradient color that is used to fill the shape.
Public property FillGradientStyle Gets or sets the gradient style that is used to fill the shape.
Public property FillStyle Gets or sets the pattern used to fill the shape.
Public property Focused Gets a value indicating whether a line or shape control currently has the input focus. (Inherited from Shape.)
Public property Height Gets or sets the height of the shape.
Public property IsAccessible Gets or sets a value indicating whether a line or shape control is available to accessibility applications. (Inherited from Shape.)
Public property IsDisposed Gets a value indicating whether a line or shape control has been disposed of. (Inherited from Shape.)
Public property Left Gets or sets the distance, in pixels, between the left edge of the shape and the left edge of its container's client area.
Public property Location Gets or sets the coordinates of the upper-left corner of the shape relative to the upper-left corner of its container.
Public property Name Gets or sets the name of a line or shape control. (Inherited from Shape.)
Public property Parent Gets or sets the parent container of a line or shape control. (Inherited from Shape.)
Public property Region Gets or sets the window region associated with a line or shape control. (Inherited from Shape.)
Public property Right Gets the distance, in pixels, between the right edge of the shape and the left edge of its container's client area.
Public property SelectionColor Gets or sets the selection color of a shape. (Inherited from Shape.)
Public property Site Gets or sets the ISite of the Component. (Inherited from Component.)
Public property Size Gets or sets the height and width of the shape.
Public property Tag Gets or sets the object that contains data about a line or shape control. (Inherited from Shape.)
Public property Top Gets or sets the distance, in pixels, between the top edge of the shape and the left edge of its container's client area.
Public property UseWaitCursor Gets or sets a value indicating whether to use the wait cursor for the current line or shape control. (Inherited from Shape.)
Public property Visible Gets or sets a value indicating whether a line or shape control is displayed. (Inherited from Shape.)
Public property Width Gets or sets the width of the shape.

Top

Methods

  Name Description
Public method BringToFront Brings a line or shape control to the front of the z-order. (Inherited from Shape.)
Protected method CreateAccessibilityInstance Creates a new accessibility object for the shape control. (Overrides Shape.CreateAccessibilityInstance().)
Public method CreateObjRef Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object. (Inherited from MarshalByRefObject.)
Public method Dispose() Releases all resources used by the Component. (Inherited from Component.)
Protected method Dispose(Boolean) Releases the unmanaged resources used by a line or shape control and optionally releases the managed resources. (Inherited from Shape.)
Public method DrawToBitmap Supports rendering to the specified bitmap. (Overrides Shape.DrawToBitmap(Bitmap, Rectangle).)
Public method Equals Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Protected method Finalize Releases unmanaged resources and performs other cleanup operations before the Component is reclaimed by garbage collection. (Inherited from Component.)
Public method FindForm Retrieves the form that a line or shape control is on. (Inherited from Shape.)
Public method Focus Sets input focus to a line or shape control. (Inherited from Shape.)
Public method GetContainerControl Returns the next ContainerControl up in a line or shape control's chain of parent controls. (Inherited from Shape.)
Public method GetHashCode Serves as a hash function for a particular type. (Inherited from Object.)
Public method GetLifetimeService Retrieves the current lifetime service object that controls the lifetime policy for this instance. (Inherited from MarshalByRefObject.)
Protected method GetService Returns an object that represents a service provided by the Component or by its Container. (Inherited from Component.)
Public method GetType Gets the Type of the current instance. (Inherited from Object.)
Public method Hide Conceals a line or shape control from the user. (Inherited from Shape.)
Public method HitTest Determines whether a shape control is located at the specified point on the screen. (Overrides Shape.HitTest(Int32, Int32).)
Public method InitializeLifetimeService Obtains a lifetime service object to control the lifetime policy for this instance. (Inherited from MarshalByRefObject.)
Public method Invalidate Invalidates a specific region of a line or shape control and causes a paint message to be sent to the control. (Inherited from Shape.)
Protected method MemberwiseClone() Creates a shallow copy of the current Object. (Inherited from Object.)
Protected method MemberwiseClone(Boolean) Creates a shallow copy of the current MarshalByRefObject object. (Inherited from MarshalByRefObject.)
Protected method OnBackColorChanged Raises the BackColorChanged event.
Protected method OnBackgroundImageChanged Raises the BackgroundImageChanged event.
Protected method OnBackgroundImageLayoutChanged Raises the BackgroundImageLayoutChanged event.
Protected method OnClick Raises the Click event. (Inherited from Shape.)
Protected method OnClientSizeChanged Raises the ClientSizeChanged event.
Protected method OnContextMenuChanged Raises the ContextMenuChanged event. (Inherited from Shape.)
Protected method OnContextMenuStripChanged Raises the ContextMenuStripChanged event. (Inherited from Shape.)
Protected method OnCursorChanged Raises the CursorChanged event. (Inherited from Shape.)
Protected method OnDoubleClick Raises the DoubleClick event. (Inherited from Shape.)
Protected method OnEnabledChanged Raises the EnabledChanged event. (Inherited from Shape.)
Protected method OnEnter Raises the Enter event. (Inherited from Shape.)
Protected method OnGotFocus Raises the GotFocus event. (Inherited from Shape.)
Protected method OnInvalidated Raises the Invalidated event. (Inherited from Shape.)
Protected method OnKeyDown Raises the KeyDown event. (Inherited from Shape.)
Protected method OnKeyPress Raises the KeyPress event. (Inherited from Shape.)
Protected method OnKeyUp Raises the KeyUp event. (Inherited from Shape.)
Protected method OnLeave Raises the Leave event. (Inherited from Shape.)
Protected method OnLocationChanged Raises the LocationChanged event.
Protected method OnLostFocus Raises the LostFocus event. (Inherited from Shape.)
Protected method OnMouseClick Raises the MouseClick event. (Inherited from Shape.)
Protected method OnMouseDoubleClick Raises the MouseDoubleClick event. (Inherited from Shape.)
Protected method OnMouseDown Raises the MouseDown event. (Inherited from Shape.)
Protected method OnMouseEnter Raises the MouseEnter event. (Inherited from Shape.)
Protected method OnMouseHover Raises the MouseHover event. (Inherited from Shape.)
Protected method OnMouseLeave Raises the MouseLeave event. (Inherited from Shape.)
Protected method OnMouseMove Raises the MouseMove event. (Inherited from Shape.)
Protected method OnMouseUp Raises the MouseUp event. (Inherited from Shape.)
Protected method OnMouseWheel Raises the MouseWheel event. (Inherited from Shape.)
Protected method OnMove Raises the Move event. (Inherited from Shape.)
Protected method OnPaint Raises the Paint event. (Overrides Shape.OnPaint(PaintEventArgs).)
Protected method OnParentChanged Raises the ParentChanged event. (Inherited from Shape.)
Protected method OnPreviewKeyDown Raises the PreviewKeyDown event. (Inherited from Shape.)
Protected method OnQueryAccessibilityHelp Raises the QueryAccessibilityHelp event. (Inherited from Shape.)
Protected method OnRegionChanged Raises the RegionChanged event. (Inherited from Shape.)
Protected method OnResize Raises the Resize event.
Protected method OnSizeChanged Raises the SizeChanged event.
Protected method OnVisibleChanged Raises the VisibleChanged event. (Inherited from Shape.)
Public method PointToClient Computes the location of the specified screen point into client coordinates. (Inherited from Shape.)
Public method PointToScreen Computes the location of the specified client point into screen coordinates. (Inherited from Shape.)
Public method RectangleToClient Computes the size and location of the specified screen rectangle in client coordinates. (Inherited from Shape.)
Public method RectangleToScreen Computes the size and location of the specified client rectangle in screen coordinates. (Inherited from Shape.)
Public method Refresh Forces a control to invalidate its client area and immediately redraw itself and any child controls. (Inherited from Shape.)
Public method ResumePaint Resumes usual painting logic, optionally forcing an immediate layout of pending paint requests. (Inherited from Shape.)
Public method Scale Scales the shape by the specified scaling factor. (Overrides Shape.Scale(SizeF).)
Public method Select Enables a control. (Inherited from Shape.)
Public method SendToBack Sends a line or shape control to the back of the z-order. (Inherited from Shape.)
Public method SetBounds Sets the bounds of the shape to the specified location and size.
Public method Show Displays a shape to the user. (Inherited from Shape.)
Public method SuspendPaint Suspends the painting logic for a shape. (Inherited from Shape.)
Public method ToString Returns a String containing the name of the Component, if any. This method should not be overridden. (Inherited from Component.)
Public method Update Causes the control to redraw the invalidated regions within its client area. (Inherited from Shape.)

Top

Events

  Name Description
Public event BackColorChanged Occurs when the BackColor property of the shape is changed.
Public event BackgroundImageChanged Occurs when the BackgroundImage property of a shape is changed.
Public event BackgroundImageLayoutChanged Occurs when the BackgroundImageLayout property of a shape is changed.
Public event ChangeUICues Occurs when the focus or keyboard user interface (UI) cues change. (Inherited from Shape.)
Public event Click Occurs when the shape is clicked. (Inherited from Shape.)
Public event ClientSizeChanged Occurs when the ClientSize property of a shape is changed.
Public event ContextMenuChanged Occurs when the value of the ContextMenu property changes. (Inherited from Shape.)
Public event ContextMenuStripChanged Occurs when the value of the ContextMenuStrip property changes. (Inherited from Shape.)
Public event CursorChanged Occurs when the value of the Cursor property changes. (Inherited from Shape.)
Public event Disposed Occurs when the component is disposed by a call to the Dispose method. (Inherited from Component.)
Public event DoubleClick Occurs when the shape is double-clicked. (Inherited from Shape.)
Public event EnabledChanged Occurs when the Enabled property value has changed. (Inherited from Shape.)
Public event Enter Occurs when the shape is entered. (Inherited from Shape.)
Public event GotFocus Occurs when the shape receives focus. (Inherited from Shape.)
Public event Invalidated Occurs when a shape's display requires redrawing. (Inherited from Shape.)
Public event KeyDown Occurs when a key is pressed and the shape has focus. (Inherited from Shape.)
Public event KeyPress Occurs when a key is pressed and the shape has focus. (Inherited from Shape.)
Public event KeyUp Occurs when a key is released and the shape has focus. (Inherited from Shape.)
Public event Leave Occurs when the input focus leaves the shape. (Inherited from Shape.)
Public event LocationChanged Occurs when the Location property of a shape is changed.
Public event LostFocus Occurs when the shape loses focus. (Inherited from Shape.)
Public event MouseClick Occurs when the shape is clicked by the mouse. (Inherited from Shape.)
Public event MouseDoubleClick Occurs when the shape is double-clicked by the mouse. (Inherited from Shape.)
Public event MouseDown Occurs when the mouse pointer is over the shape and a mouse button is pressed. (Inherited from Shape.)
Public event MouseEnter Occurs when the mouse pointer enters the shape. (Inherited from Shape.)
Public event MouseHover Occurs when the mouse pointer rests on the shape. (Inherited from Shape.)
Public event MouseLeave Occurs when the mouse pointer leaves the shape. (Inherited from Shape.)
Public event MouseMove Occurs when the mouse pointer is moved over the shape. (Inherited from Shape.)
Public event MouseUp Occurs when the mouse pointer is over the shape and a mouse button is released. (Inherited from Shape.)
Public event MouseWheel Occurs when the mouse wheel moves and the shape has focus. (Inherited from Shape.)
Public event Move Occurs when the shape is moved. (Inherited from Shape.)
Public event Paint Occurs when the shape is redrawn. (Inherited from Shape.)
Public event ParentChanged Occurs when the Parent property value changes. (Inherited from Shape.)
Public event PreviewKeyDown Occurs before the KeyDown event when a key is pressed and focus is on the shape. (Inherited from Shape.)
Public event QueryAccessibilityHelp Occurs when an AccessibleObject is providing Help to accessibility applications. (Inherited from Shape.)
Public event RegionChanged Occurs when the value of the Region property changes. (Inherited from Shape.)
Public event Resize Occurs when the size of a shape is changed.
Public event SizeChanged Occurs when the Size property of a shape is changed.
Public event VisibleChanged Occurs when the Visible property value changes. (Inherited from Shape.)

Top

Remarks

To create your own shape control, inherit from SimpleShape instead of Shape.

Thread Safety

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

See Also

Reference

Microsoft.VisualBasic.PowerPacks Namespace