This documentation is archived and is not being maintained.

Control Members

Control overview

Public Constructors

public constructorControl Constructor

Supported by the .NET Compact Framework.

Overloaded. Initializes a new instance of the Control class.

Public Properties

public propertyAccessibilityObject Gets the AccessibleObject assigned to the control.
public propertyAccessibleDefaultActionDescription Gets or sets the default action description of the control for use by accessibility client applications.
public propertyAccessibleDescription Gets or sets the description of the control used by accessibility client applications.
public propertyAccessibleName Gets or sets the name of the control used by accessibility client applications.
public propertyAccessibleRole Gets or sets the accessible role of the control
public propertyAllowDrop Gets or sets a value indicating whether the control can accept data that the user drags onto it.
public propertyAnchor Gets or sets which edges of the control are anchored to the edges of its container.
public propertyBackColor

Supported by the .NET Compact Framework.

Gets or sets the background color for the control.
public propertyBackgroundImage Gets or sets the background image displayed in the control.
public propertyBindingContext

Supported by the .NET Compact Framework.

Gets or sets the BindingContext for the control.
public propertyBottom

Supported by the .NET Compact Framework.

Gets the distance, in pixels, between the bottom edge of the control and the top edge of its container's client area.
public propertyBounds

Supported by the .NET Compact Framework.

Gets or sets the size and location of the control including its nonclient elements.
public propertyCanFocus Gets a value indicating whether the control can receive focus.
public propertyCanSelect Gets a value indicating whether the control can be selected.
public propertyCapture

Supported by the .NET Compact Framework.

Gets or sets a value indicating whether the control has captured the mouse.
public propertyCausesValidation Gets or sets a value indicating whether the control causes validation to be performed on any controls that require validation when it receives focus.
public propertyClientRectangle

Supported by the .NET Compact Framework.

Gets the rectangle that represents the client area of the control.
public propertyClientSize

Supported by the .NET Compact Framework.

Gets or sets the height and width of the client area of the control.
public propertyCompanyName Gets the name of the company or creator of the application containing the control.
public propertyContainer (inherited from Component) Gets the IContainer that contains the Component.
public propertyContainsFocus Gets a value indicating whether the control, or one of its child controls, currently has the input focus.
public propertyContextMenu

Supported by the .NET Compact Framework.

Gets or sets the shortcut menu associated with the control.
public propertyControls

Supported by the .NET Compact Framework.

Gets the collection of controls contained within the control.
public propertyCreated Gets a value indicating whether the control has been created.
public propertyCursor Gets or sets the cursor that is displayed when the mouse pointer is over the control.
public propertyDataBindings

Supported by the .NET Compact Framework.

Gets the data bindings for the control.
public propertystatic (Shared in Visual Basic)DefaultBackColor Gets the default background color of the control.
public propertystatic (Shared in Visual Basic)DefaultFont Gets the default font of the control.
public propertystatic (Shared in Visual Basic)DefaultForeColor Gets the default foreground color of the control.
public propertyDisplayRectangle Gets the rectangle that represents the display area of the control.
public propertyDisposing Gets a value indicating whether the control is in the process of being disposed of.
public propertyDock Gets or sets which edge of the parent container a control is docked to.
public propertyEnabled

Supported by the .NET Compact Framework.

Gets or sets a value indicating whether the control can respond to user interaction.
public propertyFocused

Supported by the .NET Compact Framework.

Gets a value indicating whether the control has input focus.
public propertyFont

Supported by the .NET Compact Framework.

Gets or sets the font of the text displayed by the control.
public propertyForeColor

Supported by the .NET Compact Framework.

Gets or sets the foreground color of the control.
public propertyHandle Gets the window handle that the control is bound to.
public propertyHasChildren Gets a value indicating whether the control contains one or more child controls.
public propertyHeight

Supported by the .NET Compact Framework.

Gets or sets the height of the control.
public propertyImeMode Gets or sets the Input Method Editor (IME) mode of the control.
public propertyInvokeRequired 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.
public propertyIsAccessible Gets or sets a value indicating whether the control is visible to accessibility applications.
public propertyIsDisposed Gets a value indicating whether the control has been disposed of.
public propertyIsHandleCreated Gets a value indicating whether the control has a handle associated with it.
public propertyLeft

Supported by the .NET Compact Framework.

Gets or sets the distance, in pixels, between the left edge of the control and the left edge of its container's client area.
public propertyLocation

Supported by the .NET Compact Framework.

Gets or sets the coordinates of the upper-left corner of the control relative to the upper-left corner of its container.
public propertystatic (Shared in Visual Basic)ModifierKeys Gets a value indicating which of the modifier keys (SHIFT, CTRL, and ALT) is in a pressed state.
public propertystatic (Shared in Visual Basic)MouseButtons

Supported by the .NET Compact Framework.

Gets a value indicating which of the mouse buttons is in a pressed state.
public propertystatic (Shared in Visual Basic)MousePosition

Supported by the .NET Compact Framework.

Gets the position of the mouse cursor in screen coordinates.
public propertyName Gets or sets the name of the control.
public propertyParent

Supported by the .NET Compact Framework.

Gets or sets the parent container of the control.
public propertyProductName Gets the product name of the assembly containing the control.
public propertyProductVersion Gets the version of the assembly containing the control.
public propertyRecreatingHandle Gets a value indicating whether the control is currently re-creating its handle.
public propertyRegion Gets or sets the window region associated with the control.
public propertyRight

Supported by the .NET Compact Framework.

Gets the distance, in pixels, between the right edge of the control and the left edge of its container's client area.
public propertyRightToLeft Gets or sets a value indicating whether control's elements are aligned to support locales using right-to-left fonts.
public propertySite Overridden. Gets or sets the site of the control.
public propertySize

Supported by the .NET Compact Framework.

Gets or sets the height and width of the control.
public propertyTabIndex Gets or sets the tab order of the control within its container.
public propertyTabStop Gets or sets a value indicating whether the user can give the focus to this control using the TAB key.
public propertyTag Gets or sets the object that contains data about the control.
public propertyText

Supported by the .NET Compact Framework.

Gets or sets the text associated with this control.
public propertyTop

Supported by the .NET Compact Framework.

Gets or sets the distance, in pixels, between the bottom edge of the control and the top edge of its container's client area.
public propertyTopLevelControl

Supported by the .NET Compact Framework.

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.
public propertyVisible

Supported by the .NET Compact Framework.

Gets or sets a value indicating whether the control is displayed.
public propertyWidth

Supported by the .NET Compact Framework.

Gets or sets the width of the control.

Public Methods

public methodBeginInvoke Overloaded. Executes a delegate asynchronously on the thread that the control's underlying handle was created on.
public methodBringToFront

Supported by the .NET Compact Framework.

Brings the control to the front of the z-order.
public methodContains Retrieves a value indicating whether the specified control is a child of the control.
public methodCreateControl Forces the creation of the control, including the creation of the handle and any child controls.
public methodCreateGraphics

Supported by the .NET Compact Framework.

Creates the Graphics object for the control.
public methodCreateObjRef (inherited from MarshalByRefObject) Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object.
public methodDispose (inherited from Component)

Supported by the .NET Compact Framework.

Overloaded. Releases the resources used by the Component.
public methodDoDragDrop Begins a drag-and-drop operation.
public methodEndInvoke Retrieves the return value of the asynchronous operation represented by the IAsyncResult object passed.
public methodEquals (inherited from Object)

Supported by the .NET Compact Framework.

Overloaded. Determines whether two Object instances are equal.
public methodFindForm Retrieves the form that the control is on.
public methodFocus

Supported by the .NET Compact Framework.

Sets input focus to the control.
public methodstatic (Shared in Visual Basic)FromChildHandle Retrieves the control that contains the specified handle.
public methodstatic (Shared in Visual Basic)FromHandle Returns the control that is currently associated with the specified handle.
public methodGetChildAtPoint Retrieves the child control that is located at the specified coordinates.
public methodGetContainerControl Returns the next ContainerControl up the control's chain of parent controls.
public methodGetHashCode (inherited from Object)

Supported by the .NET Compact Framework.

Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
public methodGetLifetimeService (inherited from MarshalByRefObject) Retrieves the current lifetime service object that controls the lifetime policy for this instance.
public methodGetNextControl Retrieves the next control forward or back in the tab order of child controls.
public methodGetType (inherited from Object)

Supported by the .NET Compact Framework.

Gets the Type of the current instance.
public methodHide

Supported by the .NET Compact Framework.

Conceals the control from the user.
public methodInitializeLifetimeService (inherited from MarshalByRefObject) Obtains a lifetime service object to control the lifetime policy for this instance.
public methodInvalidate

Supported by the .NET Compact Framework.

Overloaded. Invalidates a specific region of the control and causes a paint message to be sent to the control.
public methodInvoke

Supported by the .NET Compact Framework.

Overloaded. Executes a delegate on the thread that owns the control's underlying window handle.
public methodstatic (Shared in Visual Basic)IsMnemonic Determines if the specified character is the mnemonic character assigned to the control in the specified string.
public methodPerformLayout Overloaded. Forces the control to apply layout logic to child controls.
public methodPointToClient

Supported by the .NET Compact Framework.

Computes the location of the specified screen point into client coordinates.
public methodPointToScreen

Supported by the .NET Compact Framework.

Computes the location of the specified client point into screen coordinates.
public methodPreProcessMessage Preprocesses input messages within the message loop before they are dispatched.
public methodRectangleToClient

Supported by the .NET Compact Framework.

Computes the size and location of the specified screen rectangle in client coordinates.
public methodRectangleToScreen

Supported by the .NET Compact Framework.

Computes the size and location of the specified client rectangle in screen coordinates.
public methodRefresh

Supported by the .NET Compact Framework.

Forces the control to invalidate its client area and immediately redraw itself and any child controls.
public methodResetBackColor Resets the BackColor property to its default value.
public methodResetBindings Resets the DataBindings property to its default value.
public methodResetCursor Resets the Cursor property to its default value.
public methodResetFont Resets the Font property to its default value.
public methodResetForeColor Resets the ForeColor property to its default value.
public methodResetImeMode Resets the ImeMode property to its default value.
public methodResetRightToLeft Resets the RightToLeft property to its default value.
public methodResetText Resets the Text property to its default value.
public methodResumeLayout Overloaded. Resumes normal layout logic.
public methodScale Overloaded. Scales the control and any child controls.
public methodSelect Overloaded. Activates a control.
public methodSelectNextControl Activates the next control.
public methodSendToBack

Supported by the .NET Compact Framework.

Sends the control to the back of the z-order.
public methodSetBounds Overloaded. Sets the bounds of the control.
public methodShow

Supported by the .NET Compact Framework.

Displays the control to the user.
public methodSuspendLayout Temporarily suspends the layout logic for the control.
public methodToString (inherited from Object)

Supported by the .NET Compact Framework.

Returns a String that represents the current Object.
public methodUpdate

Supported by the .NET Compact Framework.

Causes the control to redraw the invalidated regions within its client area.

Public Events

public eventBackColorChanged Occurs when the value of the BackColor property changes.
public eventBackgroundImageChanged Occurs when the value of the BackgroundImage property changes.
public eventBindingContextChanged Occurs when the value of the BindingContext property changes.
public eventCausesValidationChanged Occurs when the value of the CausesValidation property changes.
public eventChangeUICues Occurs when the focus or keyboard user interface (UI) cues change.
public eventClick Occurs when the control is clicked.
public eventContextMenuChanged Occurs when the value of the ContextMenu property changes.
public eventControlAdded Occurs when a new control is added to the Control.ControlCollection.
public eventControlRemoved Occurs when a control is removed from the Control.ControlCollection.
public eventCursorChanged Occurs when the value of the Cursor property changes.
public eventDisposed (inherited from Component) Adds an event handler to listen to the Disposed event on the component.
public eventDockChanged Occurs when the value of the Dock property changes.
public eventDoubleClick Occurs when the control is double-clicked.
public eventDragDrop Occurs when a drag-and-drop operation is completed.
public eventDragEnter Occurs when an object is dragged into the control's bounds.
public eventDragLeave Occurs when an object is dragged out of the control's bounds.
public eventDragOver Occurs when an object is dragged over the control's bounds.
public eventEnabledChanged Occurs when the Enabled property value has changed.
public eventEnter Occurs when the control is entered.
public eventFontChanged Occurs when the Font property value changes.
public eventForeColorChanged Occurs when the ForeColor property value changes.
public eventGiveFeedback Occurs during a drag operation.
public eventGotFocus Occurs when the control receives focus.
public eventHandleCreated Occurs when a handle is created for the control.
public eventHandleDestroyed Occurs when the control's handle is in the process of being destroyed.
public eventHelpRequested Occurs when the user requests help for a control.
public eventImeModeChanged Occurs when the ImeMode property has changed.
public eventInvalidated Occurs when a control's display requires redrawing.
public eventKeyDown Occurs when a key is pressed while the control has focus.
public eventKeyPress Occurs when a key is pressed while the control has focus.
public eventKeyUp Occurs when a key is released while the control has focus.
public eventLayout Occurs when a control should reposition its child controls.
public eventLeave Occurs when the input focus leaves the control.
public eventLocationChanged Occurs when the Location property value has changed.
public eventLostFocus Occurs when the control loses focus.
public eventMouseDown Occurs when the mouse pointer is over the control and a mouse button is pressed.
public eventMouseEnter Occurs when the mouse pointer enters the control.
public eventMouseHover Occurs when the mouse pointer hovers over the control.
public eventMouseLeave Occurs when the mouse pointer leaves the control.
public eventMouseMove Occurs when the mouse pointer is moved over the control.
public eventMouseUp Occurs when the mouse pointer is over the control and a mouse button is released.
public eventMouseWheel Occurs when the mouse wheel moves while the control has focus.
public eventMove Occurs when the control is moved.
public eventPaint Occurs when the control is redrawn.
public eventParentChanged Occurs when the Parent property value changes.
public eventQueryAccessibilityHelp Occurs when AccessibleObject is providing help to accessibility applications.
public eventQueryContinueDrag Occurs during a drag-and-drop operation and allows the drag source to determine whether the drag-and-drop operation should be canceled.
public eventResize Occurs when the control is resized.
public eventRightToLeftChanged Occurs when the RightToLeft property value changes.
public eventSizeChanged Occurs when the Size property value changes.
public eventStyleChanged Occurs when the control style changes.
public eventSystemColorsChanged Occurs when the system colors change.
public eventTabIndexChanged Occurs when the TabIndex property value changes.
public eventTabStopChanged Occurs when the TabStop property value changes.
public eventTextChanged Occurs when the Text property value changes.
public eventValidated Occurs when the control is finished validating.
public eventValidating Occurs when the control is validating.
public eventVisibleChanged Occurs when the Visible property value changes.

Protected Properties

protected propertyCreateParams Gets the required creation parameters when the control handle is created.
protected propertyDefaultImeMode Gets the default Input Method Editor (IME) mode supported by the control.
protected propertyDefaultSize Gets the default size of the control.
protected propertyDesignMode (inherited from Component) Gets a value that indicates whether the Component is currently in design mode.
protected propertyEvents (inherited from Component) Gets the list of event handlers that are attached to this Component.
protected propertyFontHeight Gets or sets the height of the font of the control.
protected propertyResizeRedraw Gets or sets a value indicating whether the control redraws itself when resized.
protected propertyShowFocusCues Gets a value indicating whether the control should display focus rectangles.
protected propertyShowKeyboardCues Gets a value indicating whether the control should display keyboard shortcuts.

Protected Methods

protected methodAccessibilityNotifyClients Notifies the accessibility client applications of the specified AccessibleEvents for the specified child control.
protected methodCreateAccessibilityInstance Creates a new accessibility object for the control.
protected methodCreateControlsInstance Creates a new instance of the control collection for the control.
protected methodCreateHandle Creates a handle for the control.
protected methodDefWndProc Sends the specified message to the default window procedure.
protected methodDestroyHandle Destroys the handle associated with the control.
protected methodDispose

Supported by the .NET Compact Framework.

Overloaded. Overridden. Releases all resources used by the Control.
protected methodFinalize (inherited from Component)

Supported by the .NET Compact Framework.

Overridden. Releases unmanaged resources and performs other cleanup operations before the Component is reclaimed by garbage collection.

In C# and C++, finalizers are expressed using destructor syntax.

protected methodGetService (inherited from Component) Returns an object that represents a service provided by the Component or by its Container.
protected methodGetStyle Retrieves the value of the specified control style bit for the control.
protected methodGetTopLevel Determines if the control is a top-level control.
protected methodInitLayout Called after the control has been added to another container.
protected methodInvokeGotFocus Raises the GotFocus event for the specified control.
protected methodInvokeLostFocus Raises the LostFocus event for the specified control.
protected methodInvokeOnClick Raises the Click event for the specified control.
protected methodInvokePaint Raises the Paint event for the specified control.
protected methodInvokePaintBackground Raises the PaintBackground event for the specified control.
protected methodIsInputChar Determines if a character is an input character that the control recognizes.
protected methodIsInputKey Determines whether the specified key is a regular input key or a special key that requires preprocessing.
protected methodMemberwiseClone (inherited from Object)

Supported by the .NET Compact Framework.

Creates a shallow copy of the current Object.
protected methodOnBackColorChanged Raises the BackColorChanged event.
protected methodOnBackgroundImageChanged Raises the BackgroundImageChanged event.
protected methodOnBindingContextChanged

Supported by the .NET Compact Framework.

Raises the BindingContextChanged event.
protected methodOnCausesValidationChanged Raises the CausesValidationChanged event.
protected methodOnChangeUICues Raises the ChangeUICues event.
protected methodOnClick

Supported by the .NET Compact Framework.

Raises the Click event.
protected methodOnContextMenuChanged Raises the ContextMenuChanged event.
protected methodOnControlAdded Raises the ControlAdded event.
protected methodOnControlRemoved Raises the ControlRemoved event.
protected methodOnCreateControl Raises the CreateControl event.
protected methodOnCursorChanged Raises the CursorChanged event.
protected methodOnDockChanged Raises the DockChanged event.
protected methodOnDoubleClick Raises the DoubleClick event.
protected methodOnDragDrop Raises the DragDrop event.
protected methodOnDragEnter Raises the DragEnter event.
protected methodOnDragLeave Raises the DragLeave event.
protected methodOnDragOver Raises the DragOver event.
protected methodOnEnabledChanged

Supported by the .NET Compact Framework.

Raises the EnabledChanged event.
protected methodOnEnter Raises the Enter event.
protected methodOnFontChanged Raises the FontChanged event.
protected methodOnForeColorChanged Raises the ForeColorChanged event.
protected methodOnGiveFeedback Raises the GiveFeedback event.
protected methodOnGotFocus

Supported by the .NET Compact Framework.

Raises the GotFocus event.
protected methodOnHandleCreated Raises the HandleCreated event.
protected methodOnHandleDestroyed Raises the HandleDestroyed event.
protected methodOnHelpRequested Raises the HelpRequested event.
protected methodOnImeModeChanged Raises the ImeModeChanged event.
protected methodOnInvalidated Raises the Invalidated event.
protected methodOnKeyDown

Supported by the .NET Compact Framework.

Raises the KeyDown event.
protected methodOnKeyPress

Supported by the .NET Compact Framework.

Raises the KeyPress event.
protected methodOnKeyUp

Supported by the .NET Compact Framework.

Raises the KeyUp event.
protected methodOnLayout Raises the Layout event.
protected methodOnLeave Raises the Leave event.
protected methodOnLocationChanged Raises the LocationChanged event.
protected methodOnLostFocus

Supported by the .NET Compact Framework.

Raises the LostFocus event.
protected methodOnMouseDown

Supported by the .NET Compact Framework.

Raises the MouseDown event.
protected methodOnMouseEnter Raises the MouseEnter event.
protected methodOnMouseHover Raises the MouseHover event.
protected methodOnMouseLeave Raises the MouseLeave event.
protected methodOnMouseMove

Supported by the .NET Compact Framework.

Raises the MouseMove event.
protected methodOnMouseUp

Supported by the .NET Compact Framework.

Raises the MouseUp event.
protected methodOnMouseWheel Raises the MouseWheel event.
protected methodOnMove Raises the Move event.
protected methodOnNotifyMessage Notifies the control of Windows messages.
protected methodOnPaint

Supported by the .NET Compact Framework.

Raises the Paint event.
protected methodOnPaintBackground

Supported by the .NET Compact Framework.

Paints the background of the control.
protected methodOnParentBackColorChanged Raises the BackColorChanged event when the BackColor property value of the control's container changes.
protected methodOnParentBackgroundImageChanged Raises the BackgroundImageChanged event when the BackgroundImage property value of the control's container changes.
protected methodOnParentBindingContextChanged Raises the BindingContextChanged event when the BindingContext property value of the control's container changes.
protected methodOnParentChanged

Supported by the .NET Compact Framework.

Raises the ParentChanged event.
protected methodOnParentEnabledChanged Raises the EnabledChanged event when the Enabled property value of the control's container changes.
protected methodOnParentFontChanged Raises the FontChanged event when the Font property value of the control's container changes.
protected methodOnParentForeColorChanged Raises the ForeColorChanged event when the ForeColor property value of the control's container changes.
protected methodOnParentRightToLeftChanged Raises the RightToLeftChanged event when the RightToLeft property value of the control's container changes.
protected methodOnParentVisibleChanged Raises the VisibleChanged event when the Visible property value of the control's container changes.
protected methodOnQueryContinueDrag Raises the QueryContinueDrag event.
protected methodOnResize

Supported by the .NET Compact Framework.

Raises the Resize event.
protected methodOnRightToLeftChanged Raises the RightToLeftChanged event.
protected methodOnSizeChanged Raises the SizeChanged event.
protected methodOnStyleChanged Raises the StyleChanged event.
protected methodOnSystemColorsChanged Raises the SystemColorsChanged event.
protected methodOnTabIndexChanged Raises the TabIndexChanged event.
protected methodOnTabStopChanged Raises the TabStopChanged event.
protected methodOnTextChanged

Supported by the .NET Compact Framework.

Raises the TextChanged event.
protected methodOnValidated Raises the Validated event.
protected methodOnValidating Raises the Validating event.
protected methodOnVisibleChanged Raises the VisibleChanged event.
protected methodProcessCmdKey Processes a command key.
protected methodProcessDialogChar Processes a dialog character.
protected methodProcessDialogKey Processes a dialog key.
protected methodProcessKeyEventArgs Processes a key message and generates the appropriate control events.
protected methodProcessKeyMessage Processes a keyboard message.
protected methodProcessKeyPreview Previews a keyboard message.
protected methodProcessMnemonic Processes a mnemonic character.
protected methodRecreateHandle Forces the re-creation of the handle for the control.
protected methodstatic (Shared in Visual Basic)ReflectMessage Reflects the specified message to the control that is bound to the specified handle.
protected methodRtlTranslateAlignment Overloaded. Converts the current alignment to the appropriate alignment to support right-to-left text.
protected methodRtlTranslateContent Converts the specified ContentAlignment to the appropriate ContentAlignment to support right-to-left text.
protected methodRtlTranslateHorizontal Converts the specified HorizontalAlignment to the appropriate HorizontalAlignment to support right-to-left text.
protected methodRtlTranslateLeftRight Converts the specified LeftRightAlignment to the appropriate LeftRightAlignment to support right-to-left text.
protected methodScaleCore Performs the work of scaling the entire control and any child controls.
protected methodSelect Overloaded. Activates a control.
protected methodSetBoundsCore Performs the work of setting the specified bounds of this control.
protected methodSetClientSizeCore Sets the size of the client area of the control.
protected methodSetStyle Sets the specified style bit to the specified value.
protected methodSetTopLevel Sets the control as the top-level control.
protected methodSetVisibleCore Sets the control to the specified visible state.
protected methodUpdateBounds Overloaded. Updates the bounds of the control.
protected methodUpdateStyles Forces the assigned styles to be reapplied to the control.
protected methodUpdateZOrder Updates the control in its parent's z-order.
protected methodWndProc Processes Windows messages.

See Also

Control Class | System.Windows.Forms Namespace

Show: