Control Control Control Control Class
Definición
Define la clase base para los controles, que son componentes con una representación visual.Defines the base class for controls, which are components with visual representation.
public ref class Control : System::ComponentModel::Component, IDisposable, System::ComponentModel::ISynchronizeInvoke, System::Windows::Forms::IBindableComponent, System::Windows::Forms::IDropTarget, System::Windows::Forms::IWin32Window
[System.Runtime.InteropServices.ComVisible(true)]
[System.Runtime.InteropServices.ClassInterface(System.Runtime.InteropServices.ClassInterfaceType.AutoDispatch)]
public class Control : System.ComponentModel.Component, IDisposable, System.ComponentModel.ISynchronizeInvoke, System.Windows.Forms.IBindableComponent, System.Windows.Forms.IDropTarget, System.Windows.Forms.IWin32Window
type Control = class
inherit Component
interface IDropTarget
interface ISynchronizeInvoke
interface IWin32Window
interface IComponent
interface IDisposable
interface IBindableComponent
Public Class Control
Inherits Component
Implements IBindableComponent, IDisposable, IDropTarget, ISynchronizeInvoke, IWin32Window
- Herencia
- Derivado
-
System.ComponentModel.Design.ByteViewerSystem.ComponentModel.Design.ByteViewerSystem.ComponentModel.Design.ByteViewerSystem.ComponentModel.Design.ByteViewerSystem.Windows.Forms.AxHostSystem.Windows.Forms.AxHostSystem.Windows.Forms.AxHostSystem.Windows.Forms.AxHostSystem.Windows.Forms.ButtonBaseSystem.Windows.Forms.ButtonBaseSystem.Windows.Forms.ButtonBaseSystem.Windows.Forms.ButtonBaseSystem.Windows.Forms.DataGridSystem.Windows.Forms.DataGridSystem.Windows.Forms.DataGridSystem.Windows.Forms.DataGridSystem.Windows.Forms.DataGridViewSystem.Windows.Forms.DataGridViewSystem.Windows.Forms.DataGridViewSystem.Windows.Forms.DataGridViewSystem.Windows.Forms.DateTimePickerSystem.Windows.Forms.DateTimePickerSystem.Windows.Forms.DateTimePickerSystem.Windows.Forms.DateTimePickerSystem.Windows.Forms.GroupBoxSystem.Windows.Forms.GroupBoxSystem.Windows.Forms.GroupBoxSystem.Windows.Forms.GroupBoxSystem.Windows.Forms.LabelSystem.Windows.Forms.LabelSystem.Windows.Forms.LabelSystem.Windows.Forms.LabelSystem.Windows.Forms.ListControlSystem.Windows.Forms.ListControlSystem.Windows.Forms.ListControlSystem.Windows.Forms.ListControlSystem.Windows.Forms.ListViewSystem.Windows.Forms.ListViewSystem.Windows.Forms.ListViewSystem.Windows.Forms.ListViewSystem.Windows.Forms.MdiClientSystem.Windows.Forms.MdiClientSystem.Windows.Forms.MdiClientSystem.Windows.Forms.MdiClientSystem.Windows.Forms.MonthCalendarSystem.Windows.Forms.MonthCalendarSystem.Windows.Forms.MonthCalendarSystem.Windows.Forms.MonthCalendarSystem.Windows.Forms.PictureBoxSystem.Windows.Forms.PictureBoxSystem.Windows.Forms.PictureBoxSystem.Windows.Forms.PictureBoxSystem.Windows.Forms.PrintPreviewControlSystem.Windows.Forms.PrintPreviewControlSystem.Windows.Forms.PrintPreviewControlSystem.Windows.Forms.PrintPreviewControlSystem.Windows.Forms.ProgressBarSystem.Windows.Forms.ProgressBarSystem.Windows.Forms.ProgressBarSystem.Windows.Forms.ProgressBarSystem.Windows.Forms.ScrollableControlSystem.Windows.Forms.ScrollableControlSystem.Windows.Forms.ScrollableControlSystem.Windows.Forms.ScrollableControlSystem.Windows.Forms.ScrollBarSystem.Windows.Forms.ScrollBarSystem.Windows.Forms.ScrollBarSystem.Windows.Forms.ScrollBarSystem.Windows.Forms.SplitterSystem.Windows.Forms.SplitterSystem.Windows.Forms.SplitterSystem.Windows.Forms.SplitterSystem.Windows.Forms.StatusBarSystem.Windows.Forms.StatusBarSystem.Windows.Forms.StatusBarSystem.Windows.Forms.StatusBarSystem.Windows.Forms.TabControlSystem.Windows.Forms.TabControlSystem.Windows.Forms.TabControlSystem.Windows.Forms.TabControlSystem.Windows.Forms.TextBoxBaseSystem.Windows.Forms.TextBoxBaseSystem.Windows.Forms.TextBoxBaseSystem.Windows.Forms.TextBoxBaseSystem.Windows.Forms.ToolBarSystem.Windows.Forms.ToolBarSystem.Windows.Forms.ToolBarSystem.Windows.Forms.ToolBarSystem.Windows.Forms.TrackBarSystem.Windows.Forms.TrackBarSystem.Windows.Forms.TrackBarSystem.Windows.Forms.TrackBarSystem.Windows.Forms.TreeViewSystem.Windows.Forms.TreeViewSystem.Windows.Forms.TreeViewSystem.Windows.Forms.TreeViewSystem.Windows.Forms.WebBrowserBaseSystem.Windows.Forms.WebBrowserBaseSystem.Windows.Forms.WebBrowserBaseSystem.Windows.Forms.WebBrowserBaseSystem.Windows.Forms.DataVisualization.Charting.ChartSystem.Windows.Forms.DataVisualization.Charting.ChartSystem.Windows.Forms.DataVisualization.Charting.ChartSystem.Windows.Forms.DataVisualization.Charting.Chart
- Atributos
- Implementaciones
-
IComponentIComponentIComponentIComponent ISynchronizeInvokeISynchronizeInvokeISynchronizeInvokeISynchronizeInvoke IDisposableIDisposableIDisposableIDisposable IBindableComponentIBindableComponentIBindableComponentIBindableComponent IDropTargetIDropTargetIDropTargetIDropTarget IWin32WindowIWin32WindowIWin32WindowIWin32Window
Comentarios
Para crear su propia clase de control, herede de la UserControl, Control clases, o desde las otras formas de Windows siempre y cuando los controles.To create your own control class, inherit from the UserControl, Control classes, or from the other Windows Forms provided controls. Para obtener más información sobre la creación de controles personalizados, vea Developing Custom Controls de Windows Forms con .NET Framework.For more information about authoring custom controls, see Developing Custom Windows Forms Controls with the .NET Framework.
La Control clase implementa la funcionalidad básica requerida por las clases que muestran información al usuario.The Control class implements very basic functionality required by classes that display information to the user. Controla la entrada del usuario a través del teclado y dispositivos señaladores.It handles user input through the keyboard and pointing devices. Controla el enrutamiento de mensajes y seguridad.It handles message routing and security. Define los límites de un control (posición y tamaño), aunque no implementa la pintura.It defines the bounds of a control (its position and size), although it does not implement painting. Proporciona un identificador de ventana (hWnd
).It provides a window handle (hWnd
).
Controles de formularios Windows Forms usan las propiedades de ambiente para que los controles secundarios pueden aparecer como en su entorno circundante.Windows Forms controls use ambient properties so child controls can appear like their surrounding environment. Un propiedad de ambiente es una propiedad de control que, si no establece, se recupera desde el control primario.An ambient property is a control property that, if not set, is retrieved from the parent control. Si el control no tiene un Parenty la propiedad no está establecida, el control intenta determinar el valor de la propiedad de ambiente a través de la Site propiedad.If the control does not have a Parent, and the property is not set, the control attempts to determine the value of the ambient property through the Site property. Si el control no está ubicado, si el sitio no es compatible con las propiedades de ambiente, o si la propiedad no está establecida en el AmbientProperties, el control utiliza sus propios valores predeterminados.If the control is not sited, if the site does not support ambient properties, or if the property is not set on the AmbientProperties, the control uses its own default values. Normalmente, una propiedad de ambiente representa una característica de un control, como BackColor, que se comunica con un control secundario.Typically, an ambient property represents a characteristic of a control, such as BackColor, that is communicated to a child control. Por ejemplo, un Button tendrá el mismo BackColor como su elemento primario Form de forma predeterminada.For example, a Button will have the same BackColor as its parent Form by default. Las propiedades de ambiente proporcionadas por el Control clase incluyen: Cursor, Font, BackColor, ForeColor, y RightToLeft.Ambient properties provided by the Control class include: Cursor, Font, BackColor, ForeColor, and RightToLeft.
Nota
Para que la aplicación de Windows Forms admiten estilos visuales, asegúrese de establecer el FlatStyle propiedad System
e incluir un manifiesto con el archivo ejecutable.To make your Windows Forms application support visual styles, be sure to set the FlatStyle property to System
and include a manifest with your executable. Un manifiesto es un archivo XML que se incluye como un recurso en el ejecutable de aplicación o como un archivo independiente que se encuentra en el mismo directorio que el archivo ejecutable.A manifest is an XML file that is included either as a resource within your application executable or as a separate file that resides in the same directory as the executable file. Para obtener un ejemplo de manifiesto, vea la sección ejemplo de la FlatStyle enumeración.For an example of a manifest, see the Example section of the FlatStyle enumeration. Para obtener más información sobre cómo usar los estilos visuales, vea estilos visuales.For more information about using visual styles, see Visual Styles.
Windows Forms tiene compatibilidad integrada para accesibilidad y proporciona información acerca de la aplicación que le permite trabajar con aplicaciones cliente de accesibilidad, como utilidades para aumentar y revisar la pantalla, la voz de las utilidades de entrada, en la pantalla teclados, dispositivos de entrada alternativos y utilidades de mejora del teclado.Windows Forms has accessibility support built in, and provides information about your application that enables it to work with accessibility client applications such as screen enlarger and reviewer utilities, voice input utilities, on-screen keyboards, alternative input devices, and keyboard enhancement utilities. A veces desea proporcionar información adicional a las aplicaciones cliente de accesibilidad.Sometimes you will want to provide additional information to accessibility client applications. Hay dos maneras de proporcionar esta información adicional.There are two ways of providing this additional information. Puede establecer el AccessibleName, AccessibleDescription, AccessibleDefaultActionDescription, y AccessibleRole los valores de propiedad que se notificará a las aplicaciones cliente de accesibilidad.You can set the AccessibleName, AccessibleDescription, AccessibleDefaultActionDescription, and AccessibleRole property values, which will be reported to accessibility client applications. Este método se utiliza normalmente para proporcionar información de accesibilidad limitado de controles existentes.This method is typically used to provide limited accessibility information for existing controls. Como alternativa, puede escribir su propia clase que deriva de la AccessibleObject o Control.ControlAccessibleObject clases, proporcionar tanta información de accesibilidad según sea necesario.Alternatively, you can write your own class deriving from the AccessibleObject or Control.ControlAccessibleObject classes, providing as much accessibility information as needed.
Nota
Para mantener un rendimiento óptimo, no establezca el tamaño de un control en su constructor.To maintain better performance, do not set the size of a control in its constructor. El método preferido es invalidar el DefaultSize propiedad.The preferred method is to override the DefaultSize property.
Nota
¿Agregar enlaces de datos para un Control en su constructor.Do not add data bindings for a Control in its constructor. Si lo hace, se producirán errores en la generación de código y puede provocar un comportamiento no deseado.Doing so will cause errors in code generation and can cause unwanted behavior.
La mayoría de los controles en el System.Windows.Forms espacio de nombres use el control común de Windows subyacente como base para compilar en.The majority of the controls in the System.Windows.Forms namespace use the underlying Windows common control as a base to build on. Para obtener más información acerca de los controles comunes de Windows, consulte referencia de Control General.For more information about the Windows common controls, see General Control Reference.
Para identificar los controles de Windows Forms desde un proceso independiente, use un estándar SendMessage
llamada para pasar el mensaje WM_GETCONTROLNAME.To identify Windows Forms controls from a separate process, use a standard SendMessage
call to pass the WM_GETCONTROLNAME message. WM_GETCONTROLNAME es independiente del idioma y la jerarquía de Windows.WM_GETCONTROLNAME is independent of the language and Windows hierarchy. Para obtener más información, vea el tema "Recomienda soluciones para Windows Forms" enautomatización de Windows Forms.For more information, see the "Recommended Solution for Windows Forms" topic inAutomating Windows Forms.
Use el InvokeRequired propiedad para sincronizar el acceso al control desde varios subprocesos.Use the InvokeRequired property to synchronize access to the control from multiple threads. Para obtener más información acerca de los controles de Windows Forms multiproceso, vea Cómo: Realizar llamadas seguras para subprocesos a controles de formularios Windows FormsFor more information about multithreaded Windows Forms controls, see How to: Make Thread-Safe Calls to Windows Forms Controls
Constructores
Control() Control() Control() Control() |
Inicializa una nueva instancia de la clase Control con los valores predeterminados.Initializes a new instance of the Control class with default settings. |
Control(Control, String) Control(Control, String) Control(Control, String) Control(Control, String) |
Inicializa una nueva instancia de la clase Control como control secundario, con un texto específico.Initializes a new instance of the Control class as a child control, with specific text. |
Control(Control, String, Int32, Int32, Int32, Int32) Control(Control, String, Int32, Int32, Int32, Int32) Control(Control, String, Int32, Int32, Int32, Int32) Control(Control, String, Int32, Int32, Int32, Int32) |
Inicializa una nueva instancia de la clase Control como control secundario, con un texto, tamaño y ubicación específicos.Initializes a new instance of the Control class as a child control, with specific text, size, and location. |
Control(String) Control(String) Control(String) Control(String) |
Inicializa una nueva instancia de la clase Control con un texto específico.Initializes a new instance of the Control class with specific text. |
Control(String, Int32, Int32, Int32, Int32) Control(String, Int32, Int32, Int32, Int32) Control(String, Int32, Int32, Int32, Int32) Control(String, Int32, Int32, Int32, Int32) |
Inicializa una nueva instancia de la clase Control con un texto, tamaño y ubicación específicos.Initializes a new instance of the Control class with specific text, size, and location. |
Propiedades
AccessibilityObject AccessibilityObject AccessibilityObject AccessibilityObject |
Obtiene AccessibleObject asignado al control.Gets the AccessibleObject assigned to the control. |
AccessibleDefaultActionDescription AccessibleDefaultActionDescription AccessibleDefaultActionDescription AccessibleDefaultActionDescription |
Obtiene o establece la descripción de la acción predeterminada del control que usan las aplicaciones cliente de accesibilidad.Gets or sets the default action description of the control for use by accessibility client applications. |
AccessibleDescription AccessibleDescription AccessibleDescription AccessibleDescription |
Obtiene o establece la descripción del control que las aplicaciones cliente de accesibilidad utilizan.Gets or sets the description of the control used by accessibility client applications. |
AccessibleName AccessibleName AccessibleName AccessibleName |
Obtiene o establece el nombre del control que las aplicaciones cliente de accesibilidad utilizan.Gets or sets the name of the control used by accessibility client applications. |
AccessibleRole AccessibleRole AccessibleRole AccessibleRole |
Obtiene o establece el rol accesible del control.Gets or sets the accessible role of the control |
AllowDrop AllowDrop AllowDrop AllowDrop |
Obtiene o establece un valor que indica si el control puede aceptar los datos que el usuario arrastra al mismo.Gets or sets a value indicating whether the control can accept data that the user drags onto it. |
Anchor Anchor Anchor Anchor |
Obtiene o establece los bordes del contenedor al que está enlazado un control y determina cómo se cambia el tamaño de un control con su elemento primario.Gets or sets the edges of the container to which a control is bound and determines how a control is resized with its parent. |
AutoScrollOffset AutoScrollOffset AutoScrollOffset AutoScrollOffset |
Obtiene o establece a dónde se desplaza este control en ScrollControlIntoView(Control).Gets or sets where this control is scrolled to in ScrollControlIntoView(Control). |
AutoSize AutoSize AutoSize AutoSize |
Esta propiedad no es relevante para esta clase.This property is not relevant for this class. |
BackColor BackColor BackColor BackColor |
Obtiene o establece el color de fondo del control.Gets or sets the background color for the control. |
BackgroundImage BackgroundImage BackgroundImage BackgroundImage |
Obtiene o establece la imagen de fondo que se muestra en el control.Gets or sets the background image displayed in the control. |
BackgroundImageLayout BackgroundImageLayout BackgroundImageLayout BackgroundImageLayout |
Obtiene o establece el diseño de imagen de fondo como se define en la enumeración ImageLayout.Gets or sets the background image layout as defined in the ImageLayout enumeration. |
BindingContext BindingContext BindingContext BindingContext |
Obtiene o establece la plantilla BindingContext para el control.Gets or sets the BindingContext for the control. |
Bottom Bottom Bottom Bottom |
Obtiene la distancia, en píxeles, que existe entre el borde inferior del control y el borde superior del área cliente de su contenedor.Gets the distance, in pixels, between the bottom edge of the control and the top edge of its container's client area. |
Bounds Bounds Bounds Bounds |
Obtiene o establece el tamaño y la ubicación del control incluyendo sus elementos no cliente, en píxeles, con respecto al control primario.Gets or sets the size and location of the control including its nonclient elements, in pixels, relative to the parent control. |
CanEnableIme CanEnableIme CanEnableIme CanEnableIme |
Obtiene un valor que indica si la propiedad ImeMode puede establecerse en un valor activo para habilitar la compatibilidad con el IME.Gets a value indicating whether the ImeMode property can be set to an active value, to enable IME support. |
CanFocus CanFocus CanFocus CanFocus |
Obtiene un valor que indica si el control puede recibir el foco.Gets a value indicating whether the control can receive focus. |
CanRaiseEvents CanRaiseEvents CanRaiseEvents CanRaiseEvents |
Determina si se pueden producir eventos en el control.Determines if events can be raised on the control. |
CanSelect CanSelect CanSelect CanSelect |
Obtiene un valor que indica si el control se puede seleccionar.Gets a value indicating whether the control can be selected. |
Capture Capture Capture Capture |
Obtiene o establece un valor que indica si el control ha capturado el mouse.Gets or sets a value indicating whether the control has captured the mouse. |
CausesValidation CausesValidation CausesValidation CausesValidation |
Obtiene o establece un valor que indica si el control hace que se realice una validación de todos los controles que requieren validación cuando reciben el foco.Gets or sets a value indicating whether the control causes validation to be performed on any controls that require validation when it receives focus. |
CheckForIllegalCrossThreadCalls CheckForIllegalCrossThreadCalls CheckForIllegalCrossThreadCalls CheckForIllegalCrossThreadCalls |
Obtiene o establece un valor que indica si se detectarán las llamadas en el subproceso equivocado que tiene acceso a la propiedad Handle de un control cuando se está depurando una aplicación.Gets or sets a value indicating whether to catch calls on the wrong thread that access a control's Handle property when an application is being debugged. |
ClientRectangle ClientRectangle ClientRectangle ClientRectangle |
Obtiene el rectángulo que representa el área cliente del control.Gets the rectangle that represents the client area of the control. |
ClientSize ClientSize ClientSize ClientSize |
Obtiene o establece el alto y el ancho del área cliente del control.Gets or sets the height and width of the client area of the control. |
CompanyName CompanyName CompanyName CompanyName |
Obtiene el nombre de la compañía o del creador de la aplicación que contiene el control.Gets the name of the company or creator of the application containing the control. |
Container Container Container Container |
Obtiene IContainer que contiene Component.Gets the IContainer that contains the Component. (Inherited from Component) |
ContainsFocus ContainsFocus ContainsFocus ContainsFocus |
Obtiene un valor que indica si el control, o uno de sus controles secundarios, tiene el foco de entrada en la actualidad.Gets a value indicating whether the control, or one of its child controls, currently has the input focus. |
ContextMenu ContextMenu ContextMenu ContextMenu |
Obtiene o establece el menú contextual asociado al control.Gets or sets the shortcut menu associated with the control. |
ContextMenuStrip ContextMenuStrip ContextMenuStrip ContextMenuStrip |
Obtiene o establece el ContextMenuStrip asociado a este control.Gets or sets the ContextMenuStrip associated with this control. |
Controls Controls Controls Controls |
Obtiene la colección de controles que contiene el control.Gets the collection of controls contained within the control. |
Created Created Created Created |
Obtiene un valor que indica si se ha creado el control.Gets a value indicating whether the control has been created. |
CreateParams CreateParams CreateParams CreateParams |
Obtiene los parámetros de creación necesarios cuando se crea el identificador del control.Gets the required creation parameters when the control handle is created. |
Cursor Cursor Cursor Cursor |
Obtiene o establece el cursor que se muestra cuando el puntero del mouse se sitúa sobre el control.Gets or sets the cursor that is displayed when the mouse pointer is over the control. |
DataBindings DataBindings DataBindings DataBindings |
Obtiene los enlaces de datos del control.Gets the data bindings for the control. |
DefaultBackColor DefaultBackColor DefaultBackColor DefaultBackColor |
Obtiene el color de fondo predeterminado del control.Gets the default background color of the control. |
DefaultCursor DefaultCursor DefaultCursor DefaultCursor |
Obtiene o establece el cursor predeterminado para el control.Gets or sets the default cursor for the control. |
DefaultFont DefaultFont DefaultFont DefaultFont |
Obtiene la fuente predeterminada del control.Gets the default font of the control. |
DefaultForeColor DefaultForeColor DefaultForeColor DefaultForeColor |
Obtiene el color de primer plano predeterminado del control.Gets the default foreground color of the control. |
DefaultImeMode DefaultImeMode DefaultImeMode DefaultImeMode |
Obtiene el modo de Editor de métodos de entrada (IME) predeterminado admitido por el control.Gets the default Input Method Editor (IME) mode supported by the control. |
DefaultMargin DefaultMargin DefaultMargin DefaultMargin |
Obtiene el espacio, en píxeles, que se especifica de manera predeterminada entre los controles.Gets the space, in pixels, that is specified by default between controls. |
DefaultMaximumSize DefaultMaximumSize DefaultMaximumSize DefaultMaximumSize |
Obtiene la longitud y el alto, en píxeles, que se especifica como el tamaño máximo predeterminado de un control.Gets the length and height, in pixels, that is specified as the default maximum size of a control. |
DefaultMinimumSize DefaultMinimumSize DefaultMinimumSize DefaultMinimumSize |
Obtiene la longitud y el alto, en píxeles, que se especifica como el tamaño mínimo predeterminado de un control.Gets the length and height, in pixels, that is specified as the default minimum size of a control. |
DefaultPadding DefaultPadding DefaultPadding DefaultPadding |
Obtiene el espaciado interno, en píxeles, del contenido de un control.Gets the internal spacing, in pixels, of the contents of a control. |
DefaultSize DefaultSize DefaultSize DefaultSize |
Obtiene el tamaño predeterminado del control.Gets the default size of the control. |
DesignMode DesignMode DesignMode DesignMode |
Obtiene un valor que indica si Component está actualmente en modo de diseño.Gets a value that indicates whether the Component is currently in design mode. (Inherited from Component) |
DeviceDpi DeviceDpi DeviceDpi DeviceDpi |
Obtiene el valor de PPP de la pantalla donde se muestra actualmente el control.Gets the DPI value for the display device where the control is currently being displayed. |
DisplayRectangle DisplayRectangle DisplayRectangle DisplayRectangle |
Obtiene el rectángulo que representa el área de presentación del control.Gets the rectangle that represents the display area of the control. |
Disposing Disposing Disposing Disposing |
Obtiene un valor que indica si la clase base Control está en el proceso de eliminación.Gets a value indicating whether the base Control class is in the process of disposing. |
Dock Dock Dock Dock |
Obtiene o establece que los bordes del control se acoplarán a su control primario y determina cómo se cambia el tamaño de un control con su elemento primario.Gets or sets which control borders are docked to its parent control and determines how a control is resized with its parent. |
DoubleBuffered DoubleBuffered DoubleBuffered DoubleBuffered |
Obtiene o establece un valor que indica si este control debe volver a dibujar su superficie mediante un búfer secundario para reducir o evitar el parpadeo.Gets or sets a value indicating whether this control should redraw its surface using a secondary buffer to reduce or prevent flicker. |
Enabled Enabled Enabled Enabled |
Obtiene o establece un valor que indica si el control puede responder a la interacción del usuario.Gets or sets a value indicating whether the control can respond to user interaction. |
Events Events Events Events |
Obtiene la lista de controladores de eventos asociados a Component.Gets the list of event handlers that are attached to this Component. (Inherited from Component) |
Focused Focused Focused Focused |
Obtiene un valor que indica si el control tiene el foco de entrada.Gets a value indicating whether the control has input focus. |
Font Font Font Font |
Obtiene o establece la fuente del texto que muestra el control.Gets or sets the font of the text displayed by the control. |
FontHeight FontHeight FontHeight FontHeight |
Obtiene o establece el alto de la fuente del control.Gets or sets the height of the font of the control. |
ForeColor ForeColor ForeColor ForeColor |
Obtiene o establece el color de primer plano del control.Gets or sets the foreground color of the control. |
Handle Handle Handle Handle |
Obtiene el identificador de ventana al que está enlazado el control.Gets the window handle that the control is bound to. |
HasChildren HasChildren HasChildren HasChildren |
Obtiene un valor que indica si el control contiene uno o más controles secundarios.Gets a value indicating whether the control contains one or more child controls. |
Height Height Height Height |
Obtiene o establece el alto del control.Gets or sets the height of the control. |
ImeMode ImeMode ImeMode ImeMode |
Obtiene o establece el modo de Editor de métodos de entrada (IME) del control.Gets or sets the Input Method Editor (IME) mode of the control. |
ImeModeBase ImeModeBase ImeModeBase ImeModeBase |
Obtiene o establece el modo IME de un control.Gets or sets the IME mode of a control. |
InvokeRequired InvokeRequired InvokeRequired InvokeRequired |
Obtiene un valor que indica si el llamador debe llamar a un método de invocación cuando realiza llamadas a métodos del control porque el llamador se encuentra en un subproceso distinto al del control donde se creó.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. |
IsAccessible IsAccessible IsAccessible IsAccessible |
Obtiene o establece un valor que indica si el control es visible para las aplicaciones de accesibilidad.Gets or sets a value indicating whether the control is visible to accessibility applications. |
IsDisposed IsDisposed IsDisposed IsDisposed |
Obtiene un valor que indica si el control se ha eliminado.Gets a value indicating whether the control has been disposed of. |
IsHandleCreated IsHandleCreated IsHandleCreated IsHandleCreated |
Obtiene un valor que indica si el control tiene un identificador asociado.Gets a value indicating whether the control has a handle associated with it. |
IsMirrored IsMirrored IsMirrored IsMirrored |
Obtiene un valor que indica si el control está reflejado.Gets a value indicating whether the control is mirrored. |
LayoutEngine LayoutEngine LayoutEngine LayoutEngine |
Obtiene una instancia almacenada en memoria caché del motor de diseño del control.Gets a cached instance of the control's layout engine. |
Left Left Left Left |
Obtiene o establece la distancia, en píxeles, que existe entre el borde izquierdo del control y el borde izquierdo del área cliente de su contenedor.Gets or sets the distance, in pixels, between the left edge of the control and the left edge of its container's client area. |
Location Location Location Location |
Obtiene o establece las coordenadas de la esquina superior izquierda del control en relación con la esquina superior izquierda de su contenedor.Gets or sets the coordinates of the upper-left corner of the control relative to the upper-left corner of its container. |
Margin Margin Margin Margin |
Obtiene o establece el espacio entre controles.Gets or sets the space between controls. |
MaximumSize MaximumSize MaximumSize MaximumSize |
Obtiene o establece el tamaño que es el límite superior que GetPreferredSize(Size) puede especificar.Gets or sets the size that is the upper limit that GetPreferredSize(Size) can specify. |
MinimumSize MinimumSize MinimumSize MinimumSize |
Obtiene o establece el tamaño que es el límite inferior que GetPreferredSize(Size) puede especificar.Gets or sets the size that is the lower limit that GetPreferredSize(Size) can specify. |
ModifierKeys ModifierKeys ModifierKeys ModifierKeys |
Obtiene un valor que indica cuál de las teclas modificadoras (MAYÚS, CTRL y ALT) está presionada.Gets a value indicating which of the modifier keys (SHIFT, CTRL, and ALT) is in a pressed state. |
MouseButtons MouseButtons MouseButtons MouseButtons |
Obtiene un valor que indica cuál de los botones del mouse está presionado.Gets a value indicating which of the mouse buttons is in a pressed state. |
MousePosition MousePosition MousePosition MousePosition |
Obtiene la posición del cursor del mouse en coordenadas de pantalla.Gets the position of the mouse cursor in screen coordinates. |
Name Name Name Name |
Obtiene o establece el nombre del control.Gets or sets the name of the control. |
Padding Padding Padding Padding |
Obtiene o establece el relleno dentro del control.Gets or sets padding within the control. |
Parent Parent Parent Parent |
Obtiene o establece el contenedor primario del control.Gets or sets the parent container of the control. |
PreferredSize PreferredSize PreferredSize PreferredSize |
Obtiene el tamaño de un área rectangular en la que cabe el control.Gets the size of a rectangular area into which the control can fit. |
ProductName ProductName ProductName ProductName |
Obtiene el nombre de producto del ensamblado que contiene el control.Gets the product name of the assembly containing the control. |
ProductVersion ProductVersion ProductVersion ProductVersion |
Obtiene la versión del ensamblado que contiene el control.Gets the version of the assembly containing the control. |
PropagatingImeMode PropagatingImeMode PropagatingImeMode PropagatingImeMode |
Obtiene un objeto que representa un modo IME de propagación.Gets an object that represents a propagating IME mode. |
RecreatingHandle RecreatingHandle RecreatingHandle RecreatingHandle |
Obtiene un valor que indica si el control está volviendo a crear su identificador en la actualidad.Gets a value indicating whether the control is currently re-creating its handle. |
Region Region Region Region |
Obtiene o establece la región de ventana asociada al control.Gets or sets the window region associated with the control. |
RenderRightToLeft RenderRightToLeft RenderRightToLeft RenderRightToLeft |
Esta propiedad está obsoleta.This property is now obsolete. |
ResizeRedraw ResizeRedraw ResizeRedraw ResizeRedraw |
Obtiene o establece un valor que indica si el control vuelve a dibujarse automáticamente cuando cambia de tamaño.Gets or sets a value indicating whether the control redraws itself when resized. |
Right Right Right Right |
Obtiene la distancia, en píxeles, que existe entre el borde derecho del control y el borde izquierdo del área cliente de su contenedor.Gets the distance, in pixels, between the right edge of the control and the left edge of its container's client area. |
RightToLeft RightToLeft RightToLeft RightToLeft |
Obtiene o establece un valor que indica si los elementos del control se alinean para admitir configuraciones regionales que utilizan fuentes de derecha a izquierda.Gets or sets a value indicating whether control's elements are aligned to support locales using right-to-left fonts. |
ScaleChildren ScaleChildren ScaleChildren ScaleChildren |
Obtiene un valor que determina el escalado de los controles secundarios.Gets a value that determines the scaling of child controls. |
ShowFocusCues ShowFocusCues ShowFocusCues ShowFocusCues |
Obtiene un valor que indica si el control debe mostrar rectángulos de foco.Gets a value indicating whether the control should display focus rectangles. |
ShowKeyboardCues ShowKeyboardCues ShowKeyboardCues ShowKeyboardCues |
Obtiene un valor que indica si la interfaz de usuario está en el estado adecuado para mostrar u ocultar los aceleradores de teclado.Gets a value indicating whether the user interface is in the appropriate state to show or hide keyboard accelerators. |
Site Site Site Site |
Obtiene o establece el sitio del control.Gets or sets the site of the control. |
Size Size Size Size |
Obtiene o establece el alto y el ancho del control.Gets or sets the height and width of the control. |
TabIndex TabIndex TabIndex TabIndex |
Obtiene o establece el orden de tabulación del control en su contenedor.Gets or sets the tab order of the control within its container. |
TabStop TabStop TabStop TabStop |
Obtiene o establece un valor que indica si el usuario puede dar el foco a este control mediante la tecla TAB.Gets or sets a value indicating whether the user can give the focus to this control using the TAB key. |
Tag Tag Tag Tag |
Obtiene o establece el objeto que contiene datos sobre el control.Gets or sets the object that contains data about the control. |
Text Text Text Text |
Obtiene o establece el texto asociado al control.Gets or sets the text associated with this control. |
Top Top Top Top |
Obtiene o establece la distancia, en píxeles, que existe entre el borde superior del control y el borde superior del área cliente de su contenedor.Gets or sets the distance, in pixels, between the top edge of the control and the top edge of its container's client area. |
TopLevelControl TopLevelControl TopLevelControl TopLevelControl |
Obtiene el control primario que no es secundario de ningún otro control de formularios Windows Forms.Gets the parent control that is not parented by another Windows Forms control. Normalmente, se trata del Form más externo en el que está contenido el control.Typically, this is the outermost Form that the control is contained in. |
UseWaitCursor UseWaitCursor UseWaitCursor UseWaitCursor |
Obtiene o establece un valor que indica si se utiliza el cursor de espera para el control actual y todos los controles secundarios.Gets or sets a value indicating whether to use the wait cursor for the current control and all child controls. |
Visible Visible Visible Visible |
Obtiene o establece un valor que indica si se muestran el control y todos sus controles secundarios.Gets or sets a value indicating whether the control and all its child controls are displayed. |
Width Width Width Width |
Obtiene o establece el ancho del control.Gets or sets the width of the control. |
WindowTarget WindowTarget WindowTarget WindowTarget |
Esta propiedad no es relevante para esta clase.This property is not relevant for this class. |
Métodos
Eventos
AutoSizeChanged AutoSizeChanged AutoSizeChanged AutoSizeChanged |
Este evento no es relevante para esta clase.This event is not relevant for this class. |
BackColorChanged BackColorChanged BackColorChanged BackColorChanged |
Se produce cuando cambia el valor de la propiedad BackColor.Occurs when the value of the BackColor property changes. |
BackgroundImageChanged BackgroundImageChanged BackgroundImageChanged BackgroundImageChanged |
Se produce cuando cambia el valor de la propiedad BackgroundImage.Occurs when the value of the BackgroundImage property changes. |
BackgroundImageLayoutChanged BackgroundImageLayoutChanged BackgroundImageLayoutChanged BackgroundImageLayoutChanged |
Se produce cuando cambia la propiedad BackgroundImageLayout.Occurs when the BackgroundImageLayout property changes. |
BindingContextChanged BindingContextChanged BindingContextChanged BindingContextChanged |
Se produce cuando cambia el valor de la propiedad BindingContext.Occurs when the value of the BindingContext property changes. |
CausesValidationChanged CausesValidationChanged CausesValidationChanged CausesValidationChanged |
Se produce cuando cambia el valor de la propiedad CausesValidation.Occurs when the value of the CausesValidation property changes. |
ChangeUICues ChangeUICues ChangeUICues ChangeUICues |
Se produce cuando cambian las guías de la interfaz de usuario para el foco o el teclado.Occurs when the focus or keyboard user interface (UI) cues change. |
Click Click Click Click |
Se produce cuando se hace clic en el control.Occurs when the control is clicked. |
ClientSizeChanged ClientSizeChanged ClientSizeChanged ClientSizeChanged |
Se produce cuando cambia el valor de la propiedad ClientSize.Occurs when the value of the ClientSize property changes. |
ContextMenuChanged ContextMenuChanged ContextMenuChanged ContextMenuChanged |
Se produce cuando cambia el valor de la propiedad ContextMenu.Occurs when the value of the ContextMenu property changes. |
ContextMenuStripChanged ContextMenuStripChanged ContextMenuStripChanged ContextMenuStripChanged |
Se produce cuando cambia el valor de la propiedad ContextMenuStrip.Occurs when the value of the ContextMenuStrip property changes. |
ControlAdded ControlAdded ControlAdded ControlAdded |
Se produce cuando se agrega un nuevo control a Control.ControlCollection.Occurs when a new control is added to the Control.ControlCollection. |
ControlRemoved ControlRemoved ControlRemoved ControlRemoved |
Se produce cuando se quita un control de Control.ControlCollection.Occurs when a control is removed from the Control.ControlCollection. |
CursorChanged CursorChanged CursorChanged CursorChanged |
Se produce cuando cambia el valor de la propiedad Cursor.Occurs when the value of the Cursor property changes. |
Disposed Disposed Disposed Disposed |
Se produce cuando el componente se elimina mediante una llamada al método Dispose().Occurs when the component is disposed by a call to the Dispose() method. (Inherited from Component) |
DockChanged DockChanged DockChanged DockChanged |
Se produce cuando cambia el valor de la propiedad Dock.Occurs when the value of the Dock property changes. |
DoubleClick DoubleClick DoubleClick DoubleClick |
Se produce cuando se hace doble clic en el control.Occurs when the control is double-clicked. |
DpiChangedAfterParent DpiChangedAfterParent DpiChangedAfterParent DpiChangedAfterParent |
Se produce al cambiar mediante programación la configuración de PPP para un control después de que haya cambiado el valor de PPP para su control o formulario principal.Occurs when the DPI setting for a control is changed programmatically after the DPI of its parent control or form has changed. |
DpiChangedBeforeParent DpiChangedBeforeParent DpiChangedBeforeParent DpiChangedBeforeParent |
Se produce al cambiar mediante programación la configuración de PPP para un control antes de que tenga lugar un evento de cambio de PPP para su control o formulario principal.Occurs when the DPI setting for a control is changed programmatically before a DPI change event for its parent control or form has occurred. |
DragDrop DragDrop DragDrop DragDrop |
Se produce cuando se completa una operación de arrastrar y colocar.Occurs when a drag-and-drop operation is completed. |
DragEnter DragEnter DragEnter DragEnter |
Se produce cuando se arrastra un objeto dentro de los límites del control.Occurs when an object is dragged into the control's bounds. |
DragLeave DragLeave DragLeave DragLeave |
Se produce cuando se arrastra un objeto fuera de los límites del control.Occurs when an object is dragged out of the control's bounds. |
DragOver DragOver DragOver DragOver |
Se produce cuando se arrastra un objeto sobre los límites del control.Occurs when an object is dragged over the control's bounds. |
EnabledChanged EnabledChanged EnabledChanged EnabledChanged |
Se produce cuando cambia el valor de la propiedad Enabled.Occurs when the Enabled property value has changed. |
Enter Enter Enter Enter |
Se produce cuando se entra en el control.Occurs when the control is entered. |
FontChanged FontChanged FontChanged FontChanged |
Se produce cuando cambia el valor de la propiedad Font.Occurs when the Font property value changes. |
ForeColorChanged ForeColorChanged ForeColorChanged ForeColorChanged |
Se produce cuando cambia el valor de la propiedad ForeColor.Occurs when the ForeColor property value changes. |
GiveFeedback GiveFeedback GiveFeedback GiveFeedback |
Se produce durante una operación de arrastre.Occurs during a drag operation. |
GotFocus GotFocus GotFocus GotFocus |
Se produce cuando el control recibe el foco.Occurs when the control receives focus. |
HandleCreated HandleCreated HandleCreated HandleCreated |
Se produce cuando se crea un identificador para el control.Occurs when a handle is created for the control. |
HandleDestroyed HandleDestroyed HandleDestroyed HandleDestroyed |
Se produce cuando el identificador del control está en proceso de eliminación.Occurs when the control's handle is in the process of being destroyed. |
HelpRequested HelpRequested HelpRequested HelpRequested |
Se produce cuando el usuario solicita ayuda para un control.Occurs when the user requests help for a control. |
ImeModeChanged ImeModeChanged ImeModeChanged ImeModeChanged |
Se produce cuando ha cambiado la propiedad ImeMode.Occurs when the ImeMode property has changed. |
Invalidated Invalidated Invalidated Invalidated |
Se produce cuando es necesario volver a dibujar un control.Occurs when a control's display requires redrawing. |
KeyDown KeyDown KeyDown KeyDown |
Se produce cuando se presiona una tecla mientras el control tiene el foco.Occurs when a key is pressed while the control has focus. |
KeyPress KeyPress KeyPress KeyPress |
Se produce cuando se presionaOccurs when a character. una tecla de espacio o retroceso mientras el control tiene el foco.space or backspace key is pressed while the control has focus. |
KeyUp KeyUp KeyUp KeyUp |
Se produce cuando se suelta una tecla mientras el control tiene el foco.Occurs when a key is released while the control has focus. |
Layout Layout Layout Layout |
Se produce cuando un control debe volver a colocar sus controles secundarios.Occurs when a control should reposition its child controls. |
Leave Leave Leave Leave |
Se produce cuando el foco de entrada deja el control.Occurs when the input focus leaves the control. |
LocationChanged LocationChanged LocationChanged LocationChanged |
Se produce cuando cambia el valor de la propiedad Location.Occurs when the Location property value has changed. |
LostFocus LostFocus LostFocus LostFocus |
Se produce cuando el control pierde el foco.Occurs when the control loses focus. |
MarginChanged MarginChanged MarginChanged MarginChanged |
Se produce cuando cambia el margen del control.Occurs when the control's margin changes. |
MouseCaptureChanged MouseCaptureChanged MouseCaptureChanged MouseCaptureChanged |
Aparece cuando el control pierde la captura del mouse.Occurs when the control loses mouse capture. |
MouseClick MouseClick MouseClick MouseClick |
Se produce cuando se hace clic con el mouse en el control.Occurs when the control is clicked by the mouse. |
MouseDoubleClick MouseDoubleClick MouseDoubleClick MouseDoubleClick |
Se produce cuando se hace doble clic con el mouse en el control.Occurs when the control is double clicked by the mouse. |
MouseDown MouseDown MouseDown MouseDown |
Se produce cuando el puntero del mouse se encuentra sobre el control y se presiona un botón del mouse.Occurs when the mouse pointer is over the control and a mouse button is pressed. |
MouseEnter MouseEnter MouseEnter MouseEnter |
Se produce cuando el puntero del mouse entra en el control.Occurs when the mouse pointer enters the control. |
MouseHover MouseHover MouseHover MouseHover |
Se produce cuando el puntero del mouse se sitúa sobre el control.Occurs when the mouse pointer rests on the control. |
MouseLeave MouseLeave MouseLeave MouseLeave |
Se produce cuando el puntero del mouse deja el control.Occurs when the mouse pointer leaves the control. |
MouseMove MouseMove MouseMove MouseMove |
Se produce cuando el puntero del mouse se mueve sobre el control.Occurs when the mouse pointer is moved over the control. |
MouseUp MouseUp MouseUp MouseUp |
Se produce cuando el puntero del mouse se encuentra sobre el control y se suelta un botón del mouse.Occurs when the mouse pointer is over the control and a mouse button is released. |
MouseWheel MouseWheel MouseWheel MouseWheel |
Se produce cuando la rueda del mouse se mueve mientras el control tiene el foco.Occurs when the mouse wheel moves while the control has focus. |
Move Move Move Move |
Se produce cuando se mueve el control.Occurs when the control is moved. |
PaddingChanged PaddingChanged PaddingChanged PaddingChanged |
Se produce cuando cambia el relleno del control.Occurs when the control's padding changes. |
Paint Paint Paint Paint |
Se produce cuando vuelve a dibujarse el control.Occurs when the control is redrawn. |
ParentChanged ParentChanged ParentChanged ParentChanged |
Se produce cuando cambia el valor de la propiedad Parent.Occurs when the Parent property value changes. |
PreviewKeyDown PreviewKeyDown PreviewKeyDown PreviewKeyDown |
Se produce antes que el evento KeyDown cuando se presiona una tecla mientras el foco está en este control.Occurs before the KeyDown event when a key is pressed while focus is on this control. |
QueryAccessibilityHelp QueryAccessibilityHelp QueryAccessibilityHelp QueryAccessibilityHelp |
Se produce cuando AccessibleObject proporciona ayuda para aplicaciones de accesibilidad.Occurs when AccessibleObject is providing help to accessibility applications. |
QueryContinueDrag QueryContinueDrag QueryContinueDrag QueryContinueDrag |
Se produce durante una operación de arrastrar y colocar, y permite al origen de arrastre determinar si la operación de arrastrar y colocar tiene que cancelarse.Occurs during a drag-and-drop operation and enables the drag source to determine whether the drag-and-drop operation should be canceled. |
RegionChanged RegionChanged RegionChanged RegionChanged |
Se produce cuando cambia el valor de la propiedad Region.Occurs when the value of the Region property changes. |
Resize Resize Resize Resize |
Se produce cuando se cambia el tamaño del control.Occurs when the control is resized. |
RightToLeftChanged RightToLeftChanged RightToLeftChanged RightToLeftChanged |
Se produce cuando cambia el valor de la propiedad RightToLeft.Occurs when the RightToLeft property value changes. |
SizeChanged SizeChanged SizeChanged SizeChanged |
Se produce cuando cambia el valor de la propiedad Size.Occurs when the Size property value changes. |
StyleChanged StyleChanged StyleChanged StyleChanged |
Se produce cuando cambia el estilo del control.Occurs when the control style changes. |
SystemColorsChanged SystemColorsChanged SystemColorsChanged SystemColorsChanged |
Se produce cuando se modifican los colores del sistema.Occurs when the system colors change. |
TabIndexChanged TabIndexChanged TabIndexChanged TabIndexChanged |
Se produce cuando cambia el valor de la propiedad TabIndex.Occurs when the TabIndex property value changes. |
TabStopChanged TabStopChanged TabStopChanged TabStopChanged |
Se produce cuando cambia el valor de la propiedad TabStop.Occurs when the TabStop property value changes. |
TextChanged TextChanged TextChanged TextChanged |
Se produce cuando cambia el valor de la propiedad Text.Occurs when the Text property value changes. |
Validated Validated Validated Validated |
Se produce cuando finaliza la validación del control.Occurs when the control is finished validating. |
Validating Validating Validating Validating |
Se produce cuando el control se está validando.Occurs when the control is validating. |
VisibleChanged VisibleChanged VisibleChanged VisibleChanged |
Se produce cuando cambia el valor de la propiedad Visible.Occurs when the Visible property value changes. |
Implementaciones de interfaz explícitas
Se aplica a
Seguridad para subprocesos
Solo los miembros siguientes son seguros para subprocesos: BeginInvoke(Delegate), EndInvoke(IAsyncResult), Invoke(Delegate), InvokeRequired, y CreateGraphics() si ya se ha creado el identificador del control.Only the following members are thread safe: BeginInvoke(Delegate), EndInvoke(IAsyncResult), Invoke(Delegate), InvokeRequired, and CreateGraphics() if the handle for the control has already been created. Una llamada a CreateGraphics() antes de que se ha creado el identificador del control en un subproceso en segundo plano puede provocar no válidas entre las llamadas de subprocesos.Calling CreateGraphics() before the control's handle has been created on a background thread can cause illegal cross thread calls.
Consulte también:
Comentarios
Nos gustaría conocer su opinión. Elija el tipo que desea proporcionar:
Nuestro sistema de comentarios está basado en los problemas de GitHub. Más información en nuestro blog.
Cargando comentarios...