Classe ShapeContainer
Fornece um contêiner para LineShape, OvalShape, RectangleShape controla e para qualquer outro controle que deriva de Shape.
Hierarquia de herança
Object
MarshalByRefObject
Component
Control
ScrollableControl
ContainerControl
UserControl
Microsoft.VisualBasic.PowerPacks.ShapeContainer
Namespace: Microsoft.VisualBasic.PowerPacks
Assembly: Microsoft.VisualBasic.PowerPacks.Vs (em Microsoft.VisualBasic.PowerPacks.Vs.dll)
Sintaxe
'Declaração
<BrowsableAttribute(False)> _
Public NotInheritable Class ShapeContainer _
Inherits UserControl
[BrowsableAttribute(false)]
public sealed class ShapeContainer : UserControl
[BrowsableAttribute(false)]
public ref class ShapeContainer sealed : public UserControl
[<Sealed>]
[<BrowsableAttribute(false)>]
type ShapeContainer =
class
inherit UserControl
end
public final class ShapeContainer extends UserControl
O tipo ShapeContainer expõe os membros a seguir.
Construtores
Nome | Descrição | |
---|---|---|
ShapeContainer | Inicializa uma nova instância da classe ShapeContainer. |
Superior
Propriedades
Nome | Descrição | |
---|---|---|
AccessibilityObject | Gets the AccessibleObject assigned to the control. (Herdado de Control.) | |
AccessibleDefaultActionDescription | Gets or sets the default action description of the control for use by accessibility client applications. (Herdado de Control.) | |
AccessibleDescription | Gets or sets the description of the control used by accessibility client applications. (Herdado de Control.) | |
AccessibleName | Gets or sets the name of the control used by accessibility client applications. (Herdado de Control.) | |
AccessibleRole | Obtém ou define a função de acessibilidade a ShapeContainer. | |
ActiveControl | Gets or sets the active control on the container control. (Herdado de ContainerControl.) | |
AllowDrop | Gets or sets a value indicating whether the control can accept data that the user drags onto it. (Herdado de Control.) | |
Anchor | Gets or sets the edges of the container to which a control is bound and determines how a control is resized with its parent. (Herdado de Control.) | |
AutoScaleDimensions | Gets or sets the dimensions that the control was designed to. (Herdado de ContainerControl.) | |
AutoScaleMode | Gets or sets the automatic scaling mode of the control. (Herdado de ContainerControl.) | |
AutoScroll | Obtém ou define um valor que indica se o contêiner permite que o usuário rolar os controles colocados fora dos limites visíveis. (Herdado de ScrollableControl.) | |
AutoScrollMargin | Obtém ou define o tamanho da margem de tentativas de SCROLL. (Herdado de ScrollableControl.) | |
AutoScrollMinSize | Obtém ou define o tamanho mínimo de tentativas de SCROLL. (Herdado de ScrollableControl.) | |
AutoScrollOffset | Gets or sets where this control is scrolled to in ScrollControlIntoView. (Herdado de Control.) | |
AutoScrollPosition | Obtém ou define o local da posição de tentativas de SCROLL. (Herdado de ScrollableControl.) | |
AutoSize | This property is not relevant for this class. (Herdado de UserControl.) | |
AutoSizeMode | Gets or sets how the control will resize itself. (Herdado de UserControl.) | |
AutoValidate | Gets or sets how the control performs validation when the user changes focus to another control. (Herdado de UserControl.) | |
BackColor | Gets or sets the background color for the control. (Herdado de Control.) | |
BackgroundImage | Gets or sets the background image displayed in the control. (Herdado de Control.) | |
BackgroundImageLayout | Gets or sets the background image layout as defined in the ImageLayout enumeration. (Herdado de Control.) | |
BindingContext | Gets or sets the BindingContext for the control. (Herdado de ContainerControl.) | |
BorderStyle | Gets or sets the border style of the user control. (Herdado de UserControl.) | |
Bottom | Gets the distance, in pixels, between the bottom edge of the control and the top edge of its container's client area. (Herdado de Control.) | |
Bounds | Gets or sets the size and location of the control including its nonclient elements, in pixels, relative to the parent control. (Herdado de Control.) | |
CanFocus | Gets a value indicating whether the control can receive focus. (Herdado de Control.) | |
CanSelect | Gets a value indicating whether the control can be selected. (Herdado de Control.) | |
Capture | Gets or sets a value indicating whether the control has captured the mouse. (Herdado de Control.) | |
CausesValidation | Gets or sets a value indicating whether the control causes validation to be performed on any controls that require validation when it receives focus. (Herdado de Control.) | |
ClientRectangle | Gets the rectangle that represents the client area of the control. (Herdado de Control.) | |
ClientSize | Gets or sets the height and width of the client area of the control. (Herdado de Control.) | |
CompanyName | Gets the name of the company or creator of the application containing the control. (Herdado de Control.) | |
Container | Obtém o IContainer que contém o Component. (Herdado de Component.) | |
ContainsFocus | Gets a value indicating whether the control, or one of its child controls, currently has the input focus. (Herdado de Control.) | |
ContextMenu | Gets or sets the shortcut menu associated with the control. (Herdado de Control.) | |
ContextMenuStrip | Gets or sets the ContextMenuStrip associated with this control. (Herdado de Control.) | |
Controls | Gets the collection of controls contained within the control. (Herdado de Control.) | |
Created | Gets a value indicating whether the control has been created. (Herdado de Control.) | |
CurrentAutoScaleDimensions | Gets the current run-time dimensions of the screen. (Herdado de ContainerControl.) | |
Cursor | Obtém ou define o cursor exibido quando o ponteiro do mouse está sobre um ShapeContainer. (Substitui Control.Cursor.) | |
DataBindings | Gets the data bindings for the control. (Herdado de Control.) | |
DisplayRectangle | Obtém o retângulo que representa a área de exibição virtual do controle. (Herdado de ScrollableControl.) | |
Disposing | Gets a value indicating whether the base Control class is in the process of disposing. (Herdado de Control.) | |
Dock | Obtém ou define as bordas do controle são encaixadas ao controle pai e determina como um controle é redimensionado quando seu pai é redimensionado. (Substitui Control.Dock.) | |
DockPadding | Obtém as configurações de preenchimento de plug-in para todas as bordas do controle. (Herdado de ScrollableControl.) | |
Enabled | Gets or sets a value indicating whether the control can respond to user interaction. (Herdado de Control.) | |
Focused | Gets a value indicating whether the control has input focus. (Herdado de Control.) | |
Font | Gets or sets the font of the text displayed by the control. (Herdado de Control.) | |
ForeColor | Gets or sets the foreground color of the control. (Herdado de Control.) | |
Handle | Gets the window handle that the control is bound to. (Herdado de Control.) | |
HasChildren | Gets a value indicating whether the control contains one or more child controls. (Herdado de Control.) | |
Height | Gets or sets the height of the control. (Herdado de Control.) | |
HorizontalScroll | Obtém as características associadas à barra de rolagem horizontal. (Herdado de ScrollableControl.) | |
ImeMode | Gets or sets the Input Method Editor (IME) mode of the control. (Herdado de Control.) | |
InvokeRequired | Gets a value indicating whether the caller must call an invoke method when making method calls to the control because the caller is on a different thread than the one the control was created on. (Herdado de Control.) | |
IsAccessible | Gets or sets a value indicating whether the control is visible to accessibility applications. (Herdado de Control.) | |
IsDisposed | Gets a value indicating whether the control has been disposed of. (Herdado de Control.) | |
IsHandleCreated | Gets a value indicating whether the control has a handle associated with it. (Herdado de Control.) | |
IsMirrored | Gets a value indicating whether the control is mirrored. (Herdado de Control.) | |
LayoutEngine | Gets a cached instance of the control's layout engine. (Herdado de Control.) | |
Left | Gets or sets the distance, in pixels, between the left edge of the control and the left edge of its container's client area. (Herdado de Control.) | |
Location | Gets or sets the coordinates of the upper-left corner of the control relative to the upper-left corner of its container. (Herdado de Control.) | |
Margin | Gets or sets the space between controls. (Herdado de Control.) | |
MaximumSize | Gets or sets the size that is the upper limit that GetPreferredSize can specify. (Herdado de Control.) | |
MinimumSize | Gets or sets the size that is the lower limit that GetPreferredSize can specify. (Herdado de Control.) | |
Name | Gets or sets the name of the control. (Herdado de Control.) | |
Padding | Gets or sets padding within the control. (Herdado de Control.) | |
Parent | Gets or sets the parent container of the control. (Herdado de Control.) | |
ParentForm | Gets the form that the container control is assigned to. (Herdado de ContainerControl.) | |
PreferredSize | Gets the size of a rectangular area into which the control can fit. (Herdado de Control.) | |
ProductName | Gets the product name of the assembly containing the control. (Herdado de Control.) | |
ProductVersion | Gets the version of the assembly containing the control. (Herdado de Control.) | |
RecreatingHandle | Gets a value indicating whether the control is currently re-creating its handle. (Herdado de Control.) | |
Region | Gets or sets the window region associated with the control. (Herdado de Control.) | |
RenderRightToLeft | Obsoleta. This property is now obsolete. (Herdado de Control.) | |
Right | Gets the distance, in pixels, between the right edge of the control and the left edge of its container's client area. (Herdado de Control.) | |
RightToLeft | Gets or sets a value indicating whether control's elements are aligned to support locales using right-to-left fonts. (Herdado de Control.) | |
Shapes | Obtém a coleção de formas que estão contidos no ShapeContainer. | |
ShowFocusCues | Gets a value indicating whether the control should display focus rectangles. (Herdado de Control.) | |
ShowKeyboardCues | Gets a value indicating whether the user interface is in the appropriate state to show or hide keyboard accelerators. (Herdado de Control.) | |
Site | Gets or sets the site of the control. (Herdado de Control.) | |
Size | Gets or sets the height and width of the control. (Herdado de Control.) | |
TabIndex | Gets or sets the tab order of the control within its container. (Herdado de Control.) | |
TabStop | Gets or sets a value indicating whether the user can give the focus to this control using the TAB key. (Herdado de Control.) | |
Tag | Gets or sets the object that contains data about the control. (Herdado de Control.) | |
Text | Gets or sets the text associated with this control. (Herdado de UserControl.) | |
Top | Gets or sets the distance, in pixels, between the top edge of the control and the top edge of its container's client area. (Herdado de Control.) | |
TopLevelControl | Gets the parent control that is not parented by another Windows Forms control.Typically, this is the outermost Form that the control is contained in. (Herdado de Control.) | |
UseWaitCursor | Gets or sets a value indicating whether to use the wait cursor for the current control and all child controls. (Herdado de Control.) | |
VerticalScroll | Obtém as características associadas à barra de rolagem vertical. (Herdado de ScrollableControl.) | |
Visible | Gets or sets a value indicating whether the control and all its child controls are displayed. (Herdado de Control.) | |
Width | Gets or sets the width of the control. (Herdado de Control.) | |
WindowTarget | Infraestrutura. This property is not relevant for this class. (Herdado de Control.) |
Superior
Métodos
Nome | Descrição | |
---|---|---|
AccessibilityNotifyClients | Notifies the accessibility client applications of the specified AccessibleEvents for the specified child control. (Herdado de Control.) | |
BeginInvoke(Delegate) | Executes the specified delegate asynchronously on the thread that the control's underlying handle was created on. (Herdado de Control.) | |
BeginInvoke(Delegate, Object) | Executes the specified delegate asynchronously with the specified arguments, on the thread that the control's underlying handle was created on. (Herdado de Control.) | |
BringToFront | Brings the control to the front of the z-order. (Herdado de Control.) | |
Contains | Retrieves a value indicating whether the specified control is a child of the control. (Herdado de Control.) | |
CreateControl | Forces the creation of the visible control, including the creation of the handle and any visible child controls. (Herdado de Control.) | |
CreateGraphics | Creates the Graphics for the control. (Herdado de Control.) | |
CreateObjRef | Segurança crítica. Cria um objeto que contém todas as informações relevantes necessárias para gerar um proxy usado para se comunicar com um objeto remoto. (Herdado de MarshalByRefObject.) | |
Dispose | Libera todos os recursos usados pela Component. (Herdado de Component.) | |
DoDragDrop | Begins a drag-and-drop operation. (Herdado de Control.) | |
DrawToBitmap | Supports rendering to the specified bitmap. (Herdado de Control.) | |
EndInvoke | Retrieves the return value of the asynchronous operation represented by the IAsyncResult passed. (Herdado de Control.) | |
Equals | Determines whether the specified object is equal to the current object. (Herdado de Object.) | |
FindForm | Retrieves the form that the control is on. (Herdado de Control.) | |
Focus | Sets input focus to the control. (Herdado de Control.) | |
GetChildAtPoint(Point) | Obtém a forma que está localizada nas coordenadas especificadas. | |
GetChildAtPoint(Point, GetChildAtPointSkip) | Retrieves the child control that is located at the specified coordinates, specifying whether to ignore child controls of a certain type. (Herdado de Control.) | |
GetContainerControl | Returns the next ContainerControl up the control's chain of parent controls. (Herdado de Control.) | |
GetHashCode | Serves as the default hash function. (Herdado de Object.) | |
GetLifetimeService | Segurança crítica. Recupera o objeto de serviço Vida útil atual que controla a diretiva vida útil para esta instância. (Herdado de MarshalByRefObject.) | |
GetNextControl | Retrieves the next control forward or back in the tab order of child controls. (Herdado de Control.) | |
GetNextShape | Recupera a forma anterior ou seguinte na ordem da ShapeCollection. | |
GetPreferredSize | Retrieves the size of a rectangular area into which a control can be fitted. (Herdado de Control.) | |
GetType | Gets the Type of the current instance. (Herdado de Object.) | |
Hide | Conceals the control from the user. (Herdado de Control.) | |
InitializeLifetimeService | Segurança crítica. Obtém um objeto de serviço de tempo de vida para controlar a diretiva vida útil para esta instância. (Herdado de MarshalByRefObject.) | |
Invalidate | Invalidates the entire surface of the control and causes the control to be redrawn. (Herdado de Control.) | |
Invalidate(Region) | Invalidates the specified region of the control (adds it to the control's update region, which is the area that will be repainted at the next paint operation), and causes a paint message to be sent to the control. (Herdado de Control.) | |
Invalidate(Boolean) | Invalidates a specific region of the control and causes a paint message to be sent to the control.Optionally, invalidates the child controls assigned to the control. (Herdado de Control.) | |
Invalidate(Rectangle) | Invalidates the specified region of the control (adds it to the control's update region, which is the area that will be repainted at the next paint operation), and causes a paint message to be sent to the control. (Herdado de Control.) | |
Invalidate(Region, Boolean) | Invalidates the specified region of the control (adds it to the control's update region, which is the area that will be repainted at the next paint operation), and causes a paint message to be sent to the control.Optionally, invalidates the child controls assigned to the control. (Herdado de Control.) | |
Invalidate(Rectangle, Boolean) | Invalidates the specified region of the control (adds it to the control's update region, which is the area that will be repainted at the next paint operation), and causes a paint message to be sent to the control.Optionally, invalidates the child controls assigned to the control. (Herdado de Control.) | |
Invoke(Delegate) | Executes the specified delegate on the thread that owns the control's underlying window handle. (Herdado de Control.) | |
Invoke(Delegate, Object) | Executes the specified delegate, on the thread that owns the control's underlying window handle, with the specified list of arguments. (Herdado de Control.) | |
PerformAutoScale | Performs scaling of the container control and its children. (Herdado de ContainerControl.) | |
PerformLayout | Forces the control to apply layout logic to all its child controls. (Herdado de Control.) | |
PerformLayout(Control, String) | Forces the control to apply layout logic to all its child controls. (Herdado de Control.) | |
PointToClient | Computes the location of the specified screen point into client coordinates. (Herdado de Control.) | |
PointToScreen | Computes the location of the specified client point into screen coordinates. (Herdado de Control.) | |
PreProcessControlMessage | Preprocesses keyboard or input messages within the message loop before they are dispatched. (Herdado de Control.) | |
PreProcessMessage | Preprocesses keyboard or input messages within the message loop before they are dispatched. (Herdado de Control.) | |
ProcessKeyMessage | Processes a keyboard message. (Herdado de Control.) | |
ProcessMnemonic | Infraestrutura. Processes a mnemonic character. (Herdado de ContainerControl.) | |
RectangleToClient | Computes the size and location of the specified screen rectangle in client coordinates. (Herdado de Control.) | |
RectangleToScreen | Computes the size and location of the specified client rectangle in screen coordinates. (Herdado de Control.) | |
Refresh | Forces the control to invalidate its client area and immediately redraw itself and any child controls. (Herdado de Control.) | |
ResetBackColor | Resets the BackColor property to its default value. (Herdado de Control.) | |
ResetBindings | Causes a control bound to the BindingSource to reread all the items in the list and refresh their displayed values. (Herdado de Control.) | |
ResetCursor | Resets the Cursor property to its default value. (Herdado de Control.) | |
ResetFont | Resets the Font property to its default value. (Herdado de Control.) | |
ResetForeColor | Resets the ForeColor property to its default value. (Herdado de Control.) | |
ResetImeMode | Resets the ImeMode property to its default value. (Herdado de Control.) | |
ResetRightToLeft | Resets the RightToLeft property to its default value. (Herdado de Control.) | |
ResetText | Resets the Text property to its default value. (Herdado de Control.) | |
ResumeLayout | Resumes usual layout logic. (Herdado de Control.) | |
ResumeLayout(Boolean) | Resumes usual layout logic, optionally forcing an immediate layout of pending layout requests. (Herdado de Control.) | |
RtlTranslateContent | Converts the specified ContentAlignment to the appropriate ContentAlignment to support right-to-left text. (Herdado de Control.) | |
Scale(Single) | Obsoleta. Scales the control and any child controls. (Herdado de Control.) | |
Scale(SizeF) | Scales the control and all child controls by the specified scaling factor. (Herdado de Control.) | |
Scale(Single, Single) | Obsoleta. Scales the entire control and any child controls. (Herdado de Control.) | |
ScrollControlIntoView | Rolar o controle filho especificado na exibição em um controle habilitado automaticamente SCROLL. (Herdado de ScrollableControl.) | |
Select | Activates the control. (Herdado de Control.) | |
SelectNextControl | Activates the next control. (Herdado de Control.) | |
SelectNextShape | Seleciona a forma anterior ou seguinte na ordem da ShapeCollection. | |
SendToBack | Sends the control to the back of the z-order. (Herdado de Control.) | |
SetAutoScrollMargin | Define o tamanho das margens de tentativas de SCROLL. (Herdado de ScrollableControl.) | |
SetBounds(Int32, Int32, Int32, Int32) | Sets the bounds of the control to the specified location and size. (Herdado de Control.) | |
SetBounds(Int32, Int32, Int32, Int32, BoundsSpecified) | Sets the specified bounds of the control to the specified location and size. (Herdado de Control.) | |
Show | Displays the control to the user. (Herdado de Control.) | |
SuspendLayout | Temporarily suspends the layout logic for the control. (Herdado de Control.) | |
ToString | Retorna um String contendo o nome da Component, se houver.Este método não deve ser substituído. (Herdado de Component.) | |
Update | Causes the control to redraw the invalidated regions within its client area. (Herdado de Control.) | |
UpdateBounds | Updates the bounds of the control with the current size and location. (Herdado de Control.) | |
Validate | Verifies the value of the control losing focus by causing the Validating and Validated events to occur, in that order. (Herdado de ContainerControl.) | |
Validate(Boolean) | Verifies the value of the control that is losing focus; conditionally dependent on whether automatic validation is turned on. (Herdado de ContainerControl.) | |
ValidateChildren | Causes all of the child controls within a control that support validation to validate their data. (Herdado de UserControl.) | |
ValidateChildren(ValidationConstraints) | Causes all of the child controls within a control that support validation to validate their data. (Herdado de UserControl.) |
Superior
Eventos
Nome | Descrição | |
---|---|---|
AutoSizeChanged | Occurs when the AutoSize property changes. (Herdado de UserControl.) | |
AutoValidateChanged | Occurs when the AutoValidate property changes. (Herdado de UserControl.) | |
BackColorChanged | Occurs when the value of the BackColor property changes. (Herdado de Control.) | |
BackgroundImageChanged | Occurs when the value of the BackgroundImage property changes. (Herdado de Control.) | |
BackgroundImageLayoutChanged | Occurs when the BackgroundImageLayout property changes. (Herdado de Control.) | |
BindingContextChanged | Occurs when the value of the BindingContext property changes. (Herdado de Control.) | |
CausesValidationChanged | Occurs when the value of the CausesValidation property changes. (Herdado de Control.) | |
ChangeUICues | Occurs when the focus or keyboard user interface (UI) cues change. (Herdado de Control.) | |
Click | Occurs when the control is clicked. (Herdado de Control.) | |
ClientSizeChanged | Occurs when the value of the ClientSize property changes. (Herdado de Control.) | |
ContextMenuChanged | Occurs when the value of the ContextMenu property changes. (Herdado de Control.) | |
ContextMenuStripChanged | Occurs when the value of the ContextMenuStrip property changes. (Herdado de Control.) | |
ControlAdded | Occurs when a new control is added to the ControlCollection. (Herdado de Control.) | |
ControlRemoved | Occurs when a control is removed from the ControlCollection. (Herdado de Control.) | |
CursorChanged | Occurs when the value of the Cursor property changes. (Herdado de Control.) | |
Disposed | Ocorre quando o componente é descartado por uma chamada para o Dispose método. (Herdado de Component.) | |
DockChanged | Occurs when the value of the Dock property changes. (Herdado de Control.) | |
DoubleClick | Occurs when the control is double-clicked. (Herdado de Control.) | |
DragDrop | Occurs when a drag-and-drop operation is completed. (Herdado de Control.) | |
DragEnter | Occurs when an object is dragged into the control's bounds. (Herdado de Control.) | |
DragLeave | Occurs when an object is dragged out of the control's bounds. (Herdado de Control.) | |
DragOver | Occurs when an object is dragged over the control's bounds. (Herdado de Control.) | |
EnabledChanged | Occurs when the Enabled property value has changed. (Herdado de Control.) | |
Enter | Occurs when the control is entered. (Herdado de Control.) | |
FontChanged | Occurs when the Font property value changes. (Herdado de Control.) | |
ForeColorChanged | Occurs when the ForeColor property value changes. (Herdado de Control.) | |
GiveFeedback | Occurs during a drag operation. (Herdado de Control.) | |
GotFocus | Occurs when the control receives focus. (Herdado de Control.) | |
HandleCreated | Occurs when a handle is created for the control. (Herdado de Control.) | |
HandleDestroyed | Occurs when the control's handle is in the process of being destroyed. (Herdado de Control.) | |
HelpRequested | Occurs when the user requests help for a control. (Herdado de Control.) | |
ImeModeChanged | Occurs when the ImeMode property has changed. (Herdado de Control.) | |
Invalidated | Occurs when a control's display requires redrawing. (Herdado de Control.) | |
KeyDown | Occurs when a key is pressed while the control has focus. (Herdado de Control.) | |
KeyPress | Occurs when a character.space or backspace key is pressed while the control has focus. (Herdado de Control.) | |
KeyUp | Occurs when a key is released while the control has focus. (Herdado de Control.) | |
Layout | Occurs when a control should reposition its child controls. (Herdado de Control.) | |
Leave | Occurs when the input focus leaves the control. (Herdado de Control.) | |
Load | Occurs before the control becomes visible for the first time. (Herdado de UserControl.) | |
LocationChanged | Occurs when the Location property value has changed. (Herdado de Control.) | |
LostFocus | Occurs when the control loses focus. (Herdado de Control.) | |
MarginChanged | Occurs when the control's margin changes. (Herdado de Control.) | |
MouseCaptureChanged | Occurs when the control loses mouse capture. (Herdado de Control.) | |
MouseClick | Occurs when the control is clicked by the mouse. (Herdado de Control.) | |
MouseDoubleClick | Occurs when the control is double clicked by the mouse. (Herdado de Control.) | |
MouseDown | Occurs when the mouse pointer is over the control and a mouse button is pressed. (Herdado de Control.) | |
MouseEnter | Occurs when the mouse pointer enters the control. (Herdado de Control.) | |
MouseHover | Occurs when the mouse pointer rests on the control. (Herdado de Control.) | |
MouseLeave | Occurs when the mouse pointer leaves the control. (Herdado de Control.) | |
MouseMove | Occurs when the mouse pointer is moved over the control. (Herdado de Control.) | |
MouseUp | Occurs when the mouse pointer is over the control and a mouse button is released. (Herdado de Control.) | |
MouseWheel | Occurs when the mouse wheel moves while the control has focus. (Herdado de Control.) | |
Move | Occurs when the control is moved. (Herdado de Control.) | |
PaddingChanged | Occurs when the control's padding changes. (Herdado de Control.) | |
Paint | Occurs when the control is redrawn. (Herdado de Control.) | |
ParentChanged | Occurs when the Parent property value changes. (Herdado de Control.) | |
PreviewKeyDown | Occurs before the KeyDown event when a key is pressed while focus is on this control. (Herdado de Control.) | |
QueryAccessibilityHelp | Occurs when AccessibleObject is providing help to accessibility applications. (Herdado de Control.) | |
QueryContinueDrag | Occurs during a drag-and-drop operation and enables the drag source to determine whether the drag-and-drop operation should be canceled. (Herdado de Control.) | |
RegionChanged | Occurs when the value of the Region property changes. (Herdado de Control.) | |
Resize | Occurs when the control is resized. (Herdado de Control.) | |
RightToLeftChanged | Occurs when the RightToLeft property value changes. (Herdado de Control.) | |
Scroll | Ocorre quando o usuário ou rolagens do código com a área do cliente. (Herdado de ScrollableControl.) | |
SizeChanged | Occurs when the Size property value changes. (Herdado de Control.) | |
StyleChanged | Occurs when the control style changes. (Herdado de Control.) | |
SystemColorsChanged | Occurs when the system colors change. (Herdado de Control.) | |
TabIndexChanged | Occurs when the TabIndex property value changes. (Herdado de Control.) | |
TabStopChanged | Occurs when the TabStop property value changes. (Herdado de Control.) | |
TextChanged | Infraestrutura. Raises the TextChanged event. (Herdado de UserControl.) | |
Validated | Occurs when the control is finished validating. (Herdado de Control.) | |
Validating | Occurs when the control is validating. (Herdado de Control.) | |
VisibleChanged | Occurs when the Visible property value changes. (Herdado de Control.) |
Superior
Implementações explícitas da interface
Nome | Descrição | |
---|---|---|
System#Windows#Forms#IContainerControl#ActivateControl | Activates the specified control. (Herdado de ContainerControl.) | |
System#Windows#Forms#IDropTarget#OnDragDrop | Infraestrutura. Raises the DragDrop event. (Herdado de Control.) | |
System#Windows#Forms#IDropTarget#OnDragEnter | Infraestrutura. Raises the DragEnter event. (Herdado de Control.) | |
System#Windows#Forms#IDropTarget#OnDragLeave | Infraestrutura. Raises the DragLeave event. (Herdado de Control.) | |
System#Windows#Forms#IDropTarget#OnDragOver | Infraestrutura. Raises the DragOver event. (Herdado de Control.) |
Superior
Comentários
A LineShape, OvalShape, ou RectangleShape controle pode estar contido em um ShapeContainer o objeto, que atua como uma tela para controles de linha e forma.
Quando você adiciona uma linha ou forma a um formulário ou um contêiner em tempo de design, um ShapeContainer é criado automaticamente se ainda não existir. O Parent propriedade da linha ou forma é definida como que ShapeContainer. O Parent propriedade da ShapeContainer é definido para o controle de formulário ou recipiente ao qual foi adicionada a linha ou forma.
Quando você cria uma linha ou forma em tempo de execução usando o New método, o controle Parent propriedade deve ser definida como um ShapeContainer. Se um ShapeContainer já existe para o formulário ou recipiente, você deve definir o Parent propriedade para que ShapeContainer. Se nenhum ShapeContainer existir, você pode criar um ShapeContainer usando o New método e o conjunto de seus Parent propriedade para o formulário ou recipiente.
Dica
Tenha cuidado para não criar mais de um ShapeContainer para cada formulário ou recipiente. Isso pode apresentar um comportamento inesperado.Se você adicionar uma linha de tempo de design ou o controle de forma a um formulário ou recipiente depois de escrever código para criar um programaticamente, você deve modificar o código para usar o ShapeContainer criado pelo designer.
Exemplos
O exemplo a seguir verifica a existência de credenciais ShapeContainer e define o Parent propriedade de um OvalShape controle criado em tempo de execução usando o New método.
Private Sub Form1_Load() Handles MyBase.Load
Dim NewOval As New OvalShape
Dim i As Integer
Dim found As Boolean
' Loop through the Controls collection.
For i = 0 To Me.Controls.Count - 1
' If a ShapeContainer is found, make it the parent.
If TypeOf Controls.Item(i) Is ShapeContainer Then
NewOval.Parent = Controls.Item(i)
found = True
Exit For
End If
Next
' If no ShapeContainer is found, create one and set the parents.
If found = False Then
Dim sc As New ShapeContainer
sc.Parent = Me
NewOval.Parent = sc
End If
NewOval.Size = New Size(200, 300)
End Sub
private void form1_Load(System.Object sender, System.EventArgs e)
{
OvalShape NewOval = new OvalShape();
int i;
bool found = false;
// Loop through the Controls collection.
for (i = 0; i < this.Controls.Count; i++)
{
// If a ShapeContainer is found, make it the parent.
if (this.Controls[i] is ShapeContainer)
{
NewOval.Parent = ((ShapeContainer)this.Controls[i]);
found = true;
break;
}
}
// If no ShapeContainer is found, create one and set the parents.
if (found == false)
{
ShapeContainer sc = new ShapeContainer();
sc.Parent = this;
NewOval.Parent = sc;
}
NewOval.Size = new Size(200, 300);
}
Acesso thread-safe
Quaisquer membros estático (Shared no Visual Basic) públicos deste tipo são thread-safe. Não há garantia de que qualquer membro de instância seja thread-safe.
Consulte também
Referência
Namespace Microsoft.VisualBasic.PowerPacks
Outros recursos
Introdução aos controles de linha e forma (Visual Studio)
Como desenhar linhas com o controle LineShape (Visual Studio)
Como desenhar formas com os controles OvalShape e RectangleShape (Visual Studio)