Any suggestions? Export (0) Print
Expand All

Control Class

 

Defines the base class for controls, which are components with visual representation.

Namespace:   System.Windows.Forms
Assembly:  System.Windows.Forms (in System.Windows.Forms.dll)

System.Object
  System.MarshalByRefObject
    System.ComponentModel.Component
      System.Windows.Forms.Control
        System.Windows.Forms.AxHost
        System.Windows.Forms.ButtonBase
        System.Windows.Forms.DataGrid
        System.Windows.Forms.DataGridView
        System.Windows.Forms.DataVisualization.Charting.Chart
        System.Windows.Forms.DateTimePicker
        System.Windows.Forms.GroupBox
        System.Windows.Forms.Integration.ElementHost
        System.Windows.Forms.Label
        System.Windows.Forms.ListControl
        System.Windows.Forms.ListView
        System.Windows.Forms.MdiClient
        System.Windows.Forms.MonthCalendar
        System.Windows.Forms.PictureBox
        System.Windows.Forms.PrintPreviewControl
        System.Windows.Forms.ProgressBar
        System.Windows.Forms.ScrollableControl
        System.Windows.Forms.ScrollBar
        System.Windows.Forms.Splitter
        System.Windows.Forms.StatusBar
        System.Windows.Forms.TabControl
        System.Windows.Forms.TextBoxBase
        System.Windows.Forms.ToolBar
        System.Windows.Forms.TrackBar
        System.Windows.Forms.TreeView
        System.Windows.Forms.WebBrowserBase

[ComVisibleAttribute(true)]
[ClassInterfaceAttribute(ClassInterfaceType.AutoDispatch)]
public class Control : Component, IDropTarget, ISynchronizeInvoke, 
	IWin32Window, IComponent, IDisposable, IBindableComponent

NameDescription
System_CAPS_pubmethodControl()

Initializes a new instance of the Control class with default settings.

System_CAPS_pubmethodControl(Control, String)

Initializes a new instance of the Control class as a child control, with specific text.

System_CAPS_pubmethodControl(Control, String, Int32, Int32, Int32, Int32)

Initializes a new instance of the Control class as a child control, with specific text, size, and location.

System_CAPS_pubmethodControl(String)

Initializes a new instance of the Control class with specific text.

System_CAPS_pubmethodControl(String, Int32, Int32, Int32, Int32)

Initializes a new instance of the Control class with specific text, size, and location.

NameDescription
System_CAPS_pubpropertyAccessibilityObject

Gets the AccessibleObject assigned to the control.

System_CAPS_pubpropertyAccessibleDefaultActionDescription

Gets or sets the default action description of the control for use by accessibility client applications.

System_CAPS_pubpropertyAccessibleDescription

Gets or sets the description of the control used by accessibility client applications.

System_CAPS_pubpropertyAccessibleName

Gets or sets the name of the control used by accessibility client applications.

System_CAPS_pubpropertyAccessibleRole

Gets or sets the accessible role of the control

System_CAPS_pubpropertyAllowDrop

Gets or sets a value indicating whether the control can accept data that the user drags onto it.

System_CAPS_pubpropertyAnchor

Gets or sets the edges of the container to which a control is bound and determines how a control is resized with its parent.

System_CAPS_pubpropertyAutoScrollOffset

Gets or sets where this control is scrolled to in ScrollControlIntoView.

System_CAPS_pubpropertyAutoSize

This API supports the product infrastructure and is not intended to be used directly from your code. This property is not relevant for this class.

System_CAPS_pubpropertyBackColor

Gets or sets the background color for the control.

System_CAPS_pubpropertyBackgroundImage

Gets or sets the background image displayed in the control.

System_CAPS_pubpropertyBackgroundImageLayout

Gets or sets the background image layout as defined in the ImageLayout enumeration.

System_CAPS_pubpropertyBindingContext

Gets or sets the BindingContext for the control.

System_CAPS_pubpropertyBottom

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

System_CAPS_pubpropertyBounds

Gets or sets the size and location of the control including its nonclient elements, in pixels, relative to the parent control.

System_CAPS_protpropertyCanEnableIme

Gets a value indicating whether the ImeMode property can be set to an active value, to enable IME support.

System_CAPS_pubpropertyCanFocus

Gets a value indicating whether the control can receive focus.

System_CAPS_protpropertyCanRaiseEvents

Determines if events can be raised on the control.(Overrides Component.CanRaiseEvents.)

System_CAPS_pubpropertyCanSelect

Gets a value indicating whether the control can be selected.

System_CAPS_pubpropertyCapture

Gets or sets a value indicating whether the control has captured the mouse.

System_CAPS_pubpropertyCausesValidation

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

System_CAPS_pubpropertySystem_CAPS_staticCheckForIllegalCrossThreadCalls

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.

System_CAPS_pubpropertyClientRectangle

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

System_CAPS_pubpropertyClientSize

Gets or sets the height and width of the client area of the control.

System_CAPS_pubpropertyCompanyName

Gets the name of the company or creator of the application containing the control.

System_CAPS_pubpropertyContainer

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

System_CAPS_pubpropertyContainsFocus

Gets a value indicating whether the control, or one of its child controls, currently has the input focus.

System_CAPS_pubpropertyContextMenu

Gets or sets the shortcut menu associated with the control.

System_CAPS_pubpropertyContextMenuStrip

Gets or sets the ContextMenuStrip associated with this control.

System_CAPS_pubpropertyControls

Gets the collection of controls contained within the control.

System_CAPS_pubpropertyCreated

Gets a value indicating whether the control has been created.

System_CAPS_protpropertyCreateParams

Gets the required creation parameters when the control handle is created.

System_CAPS_pubpropertyCursor

Gets or sets the cursor that is displayed when the mouse pointer is over the control.

System_CAPS_pubpropertyDataBindings

Gets the data bindings for the control.

System_CAPS_pubpropertySystem_CAPS_staticDefaultBackColor

Gets the default background color of the control.

System_CAPS_protpropertyDefaultCursor

Gets or sets the default cursor for the control.

System_CAPS_pubpropertySystem_CAPS_staticDefaultFont

Gets the default font of the control.

System_CAPS_pubpropertySystem_CAPS_staticDefaultForeColor

Gets the default foreground color of the control.

System_CAPS_protpropertyDefaultImeMode

Gets the default Input Method Editor (IME) mode supported by the control.

System_CAPS_protpropertyDefaultMargin

Gets the space, in pixels, that is specified by default between controls.

System_CAPS_protpropertyDefaultMaximumSize

Gets the length and height, in pixels, that is specified as the default maximum size of a control.

System_CAPS_protpropertyDefaultMinimumSize

Gets the length and height, in pixels, that is specified as the default minimum size of a control.

System_CAPS_protpropertyDefaultPadding

Gets the internal spacing, in pixels, of the contents of a control.

System_CAPS_protpropertyDefaultSize

Gets the default size of the control.

System_CAPS_protpropertyDesignMode

Gets a value that indicates whether the Component is currently in design mode.(Inherited from Component.)

System_CAPS_pubpropertyDisplayRectangle

Gets the rectangle that represents the display area of the control.

System_CAPS_pubpropertyDisposing

Gets a value indicating whether the base Control class is in the process of disposing.

System_CAPS_pubpropertyDock

Gets or sets which control borders are docked to its parent control and determines how a control is resized with its parent.

System_CAPS_protpropertyDoubleBuffered

Gets or sets a value indicating whether this control should redraw its surface using a secondary buffer to reduce or prevent flicker.

System_CAPS_pubpropertyEnabled

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

System_CAPS_protpropertyEvents

Gets the list of event handlers that are attached to this Component.(Inherited from Component.)

System_CAPS_pubpropertyFocused

Gets a value indicating whether the control has input focus.

System_CAPS_pubpropertyFont

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

System_CAPS_protpropertyFontHeight

Gets or sets the height of the font of the control.

System_CAPS_pubpropertyForeColor

Gets or sets the foreground color of the control.

System_CAPS_pubpropertyHandle

Gets the window handle that the control is bound to.

System_CAPS_pubpropertyHasChildren

Gets a value indicating whether the control contains one or more child controls.

System_CAPS_pubpropertyHeight

Gets or sets the height of the control.

System_CAPS_pubpropertyImeMode

Gets or sets the Input Method Editor (IME) mode of the control.

System_CAPS_protpropertyImeModeBase

Gets or sets the IME mode of a control.

System_CAPS_pubpropertyInvokeRequired

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.

System_CAPS_pubpropertyIsAccessible

Gets or sets a value indicating whether the control is visible to accessibility applications.

System_CAPS_pubpropertyIsDisposed

Gets a value indicating whether the control has been disposed of.

System_CAPS_pubpropertyIsHandleCreated

Gets a value indicating whether the control has a handle associated with it.

System_CAPS_pubpropertyIsMirrored

Gets a value indicating whether the control is mirrored.

System_CAPS_pubpropertyLayoutEngine

Gets a cached instance of the control's layout engine.

System_CAPS_pubpropertyLeft

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

System_CAPS_pubpropertyLocation

Gets or sets the coordinates of the upper-left corner of the control relative to the upper-left corner of its container.

System_CAPS_pubpropertyMargin

Gets or sets the space between controls.

System_CAPS_pubpropertyMaximumSize

Gets or sets the size that is the upper limit that GetPreferredSize can specify.

System_CAPS_pubpropertyMinimumSize

Gets or sets the size that is the lower limit that GetPreferredSize can specify.

System_CAPS_pubpropertySystem_CAPS_staticModifierKeys

Gets a value indicating which of the modifier keys (SHIFT, CTRL, and ALT) is in a pressed state.

System_CAPS_pubpropertySystem_CAPS_staticMouseButtons

Gets a value indicating which of the mouse buttons is in a pressed state.

System_CAPS_pubpropertySystem_CAPS_staticMousePosition

Gets the position of the mouse cursor in screen coordinates.

System_CAPS_pubpropertyName

Gets or sets the name of the control.

System_CAPS_pubpropertyPadding

Gets or sets padding within the control.

System_CAPS_pubpropertyParent

Gets or sets the parent container of the control.

System_CAPS_pubpropertyPreferredSize

Gets the size of a rectangular area into which the control can fit.

System_CAPS_pubpropertyProductName

Gets the product name of the assembly containing the control.

System_CAPS_pubpropertyProductVersion

Gets the version of the assembly containing the control.

System_CAPS_protpropertySystem_CAPS_staticPropagatingImeMode

Gets an object that represents a propagating IME mode.

System_CAPS_pubpropertyRecreatingHandle

Gets a value indicating whether the control is currently re-creating its handle.

System_CAPS_pubpropertyRegion

Gets or sets the window region associated with the control.

System_CAPS_protpropertyRenderRightToLeft

Obsolete.This property is now obsolete.

System_CAPS_protpropertyResizeRedraw

Gets or sets a value indicating whether the control redraws itself when resized.

System_CAPS_pubpropertyRight

Gets the distance, in pixels, between the right edge of the control and the left edge of its container's client area.

System_CAPS_pubpropertyRightToLeft

Gets or sets a value indicating whether control's elements are aligned to support locales using right-to-left fonts.

System_CAPS_protpropertyScaleChildren

Gets a value that determines the scaling of child controls.

System_CAPS_protpropertyShowFocusCues

Gets a value indicating whether the control should display focus rectangles.

System_CAPS_protpropertyShowKeyboardCues

Gets a value indicating whether the user interface is in the appropriate state to show or hide keyboard accelerators.

System_CAPS_pubpropertySite

Gets or sets the site of the control.(Overrides Component.Site.)

System_CAPS_pubpropertySize

Gets or sets the height and width of the control.

System_CAPS_pubpropertyTabIndex

Gets or sets the tab order of the control within its container.

System_CAPS_pubpropertyTabStop

Gets or sets a value indicating whether the user can give the focus to this control using the TAB key.

System_CAPS_pubpropertyTag

Gets or sets the object that contains data about the control.

System_CAPS_pubpropertyText

Gets or sets the text associated with this control.

System_CAPS_pubpropertyTop

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

System_CAPS_pubpropertyTopLevelControl

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.

System_CAPS_pubpropertyUseWaitCursor

Gets or sets a value indicating whether to use the wait cursor for the current control and all child controls.

System_CAPS_pubpropertyVisible

Gets or sets a value indicating whether the control and all its child controls are displayed.

System_CAPS_pubpropertyWidth

Gets or sets the width of the control.

System_CAPS_pubpropertyWindowTarget

This API supports the product infrastructure and is not intended to be used directly from your code. This property is not relevant for this class.

NameDescription
System_CAPS_protmethodAccessibilityNotifyClients(AccessibleEvents, Int32)

Notifies the accessibility client applications of the specified AccessibleEvents for the specified child control.

System_CAPS_protmethodAccessibilityNotifyClients(AccessibleEvents, Int32, Int32)

Notifies the accessibility client applications of the specified AccessibleEvents for the specified child control .

System_CAPS_pubmethodBeginInvoke(Delegate)

Executes the specified delegate asynchronously on the thread that the control's underlying handle was created on.

System_CAPS_pubmethodBeginInvoke(Delegate, Object[])

Executes the specified delegate asynchronously with the specified arguments, on the thread that the control's underlying handle was created on.

System_CAPS_pubmethodBringToFront()

Brings the control to the front of the z-order.

System_CAPS_pubmethodContains(Control)

Retrieves a value indicating whether the specified control is a child of the control.

System_CAPS_protmethodCreateAccessibilityInstance()

Creates a new accessibility object for the control.

System_CAPS_pubmethodCreateControl()

Forces the creation of the visible control, including the creation of the handle and any visible child controls.

System_CAPS_protmethodCreateControlsInstance()

Creates a new instance of the control collection for the control.

System_CAPS_pubmethodCreateGraphics()

Creates the Graphics for the control.

System_CAPS_protmethodCreateHandle()

Creates a handle for the control.

System_CAPS_pubmethodCreateObjRef(Type)

Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object.(Inherited from MarshalByRefObject.)

System_CAPS_protmethodDefWndProc(Message)

Sends the specified message to the default window procedure.

System_CAPS_protmethodDestroyHandle()

Destroys the handle associated with the control.

System_CAPS_pubmethodDispose()

Releases all resources used by the Component.(Inherited from Component.)

System_CAPS_protmethodDispose(Boolean)

Releases the unmanaged resources used by the Control and its child controls and optionally releases the managed resources.(Overrides Component.Dispose(Boolean).)

System_CAPS_pubmethodDoDragDrop(Object, DragDropEffects)

Begins a drag-and-drop operation.

System_CAPS_pubmethodDrawToBitmap(Bitmap, Rectangle)

Supports rendering to the specified bitmap.

System_CAPS_pubmethodEndInvoke(IAsyncResult)

Retrieves the return value of the asynchronous operation represented by the IAsyncResult passed.

System_CAPS_pubmethodEquals(Object)

Determines whether the specified object is equal to the current object.(Inherited from Object.)

System_CAPS_protmethodFinalize()

Releases unmanaged resources and performs other cleanup operations before the Component is reclaimed by garbage collection.(Inherited from Component.)

System_CAPS_pubmethodFindForm()

Retrieves the form that the control is on.

System_CAPS_pubmethodFocus()

Sets input focus to the control.

System_CAPS_pubmethodSystem_CAPS_staticFromChildHandle(IntPtr)

Retrieves the control that contains the specified handle.

System_CAPS_pubmethodSystem_CAPS_staticFromHandle(IntPtr)

Returns the control that is currently associated with the specified handle.

System_CAPS_protmethodGetAccessibilityObjectById(Int32)

Retrieves the specified AccessibleObject.

System_CAPS_protmethodGetAutoSizeMode()

Retrieves a value indicating how a control will behave when its AutoSize property is enabled.

System_CAPS_pubmethodGetChildAtPoint(Point)

Retrieves the child control that is located at the specified coordinates.

System_CAPS_pubmethodGetChildAtPoint(Point, GetChildAtPointSkip)

Retrieves the child control that is located at the specified coordinates, specifying whether to ignore child controls of a certain type.

System_CAPS_pubmethodGetContainerControl()

Returns the next ContainerControl up the control's chain of parent controls.

System_CAPS_pubmethodGetHashCode()

Serves as the default hash function. (Inherited from Object.)

System_CAPS_pubmethodGetLifetimeService()

Retrieves the current lifetime service object that controls the lifetime policy for this instance.(Inherited from MarshalByRefObject.)

System_CAPS_pubmethodGetNextControl(Control, Boolean)

Retrieves the next control forward or back in the tab order of child controls.

System_CAPS_pubmethodGetPreferredSize(Size)

Retrieves the size of a rectangular area into which a control can be fitted.

System_CAPS_protmethodGetScaledBounds(Rectangle, SizeF, BoundsSpecified)

Retrieves the bounds within which the control is scaled.

System_CAPS_protmethodGetService(Type)

Returns an object that represents a service provided by the Component or by its Container.(Inherited from Component.)

System_CAPS_protmethodGetStyle(ControlStyles)

Retrieves the value of the specified control style bit for the control.

System_CAPS_protmethodGetTopLevel()

Determines if the control is a top-level control.

System_CAPS_pubmethodGetType()

Gets the Type of the current instance.(Inherited from Object.)

System_CAPS_pubmethodHide()

Conceals the control from the user.

System_CAPS_pubmethodInitializeLifetimeService()

Obtains a lifetime service object to control the lifetime policy for this instance.(Inherited from MarshalByRefObject.)

System_CAPS_protmethodInitLayout()

Called after the control has been added to another container.

System_CAPS_pubmethodInvalidate()

Invalidates the entire surface of the control and causes the control to be redrawn.

System_CAPS_pubmethodInvalidate(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.

System_CAPS_pubmethodInvalidate(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.

System_CAPS_pubmethodInvalidate(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.

System_CAPS_pubmethodInvalidate(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.

System_CAPS_pubmethodInvalidate(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.

System_CAPS_pubmethodInvoke(Delegate)

Executes the specified delegate on the thread that owns the control's underlying window handle.

System_CAPS_pubmethodInvoke(Delegate, Object[])

Executes the specified delegate, on the thread that owns the control's underlying window handle, with the specified list of arguments.

System_CAPS_protmethodInvokeGotFocus(Control, EventArgs)

Raises the GotFocus event for the specified control.

System_CAPS_protmethodInvokeLostFocus(Control, EventArgs)

Raises the LostFocus event for the specified control.

System_CAPS_protmethodInvokeOnClick(Control, EventArgs)

Raises the Click event for the specified control.

System_CAPS_protmethodInvokePaint(Control, PaintEventArgs)

Raises the Paint event for the specified control.

System_CAPS_protmethodInvokePaintBackground(Control, PaintEventArgs)

Raises the PaintBackground event for the specified control.

System_CAPS_protmethodIsInputChar(Char)

Determines if a character is an input character that the control recognizes.

System_CAPS_protmethodIsInputKey(Keys)

Determines whether the specified key is a regular input key or a special key that requires preprocessing.

System_CAPS_pubmethodSystem_CAPS_staticIsKeyLocked(Keys)

Determines whether the CAPS LOCK, NUM LOCK, or SCROLL LOCK key is in effect.

System_CAPS_pubmethodSystem_CAPS_staticIsMnemonic(Char, String)

Determines if the specified character is the mnemonic character assigned to the control in the specified string.

System_CAPS_protmethodMemberwiseClone()

Creates a shallow copy of the current Object.(Inherited from Object.)

System_CAPS_protmethodMemberwiseClone(Boolean)

Creates a shallow copy of the current MarshalByRefObject object.(Inherited from MarshalByRefObject.)

System_CAPS_protmethodNotifyInvalidate(Rectangle)

This API supports the product infrastructure and is not intended to be used directly from your code. Raises the Invalidated event with a specified region of the control to invalidate.

System_CAPS_protmethodOnAutoSizeChanged(EventArgs)

Raises the AutoSizeChanged event.

System_CAPS_protmethodOnBackColorChanged(EventArgs)

Raises the BackColorChanged event.

System_CAPS_protmethodOnBackgroundImageChanged(EventArgs)

Raises the BackgroundImageChanged event.

System_CAPS_protmethodOnBackgroundImageLayoutChanged(EventArgs)
System_CAPS_protmethodOnBindingContextChanged(EventArgs)

Raises the BindingContextChanged event.

System_CAPS_protmethodOnCausesValidationChanged(EventArgs)

Raises the CausesValidationChanged event.

System_CAPS_protmethodOnChangeUICues(UICuesEventArgs)

Raises the ChangeUICues event.

System_CAPS_protmethodOnClick(EventArgs)

Raises the Click event.

System_CAPS_protmethodOnClientSizeChanged(EventArgs)

Raises the ClientSizeChanged event.

System_CAPS_protmethodOnContextMenuChanged(EventArgs)

Raises the ContextMenuChanged event.

System_CAPS_protmethodOnContextMenuStripChanged(EventArgs)

Raises the ContextMenuStripChanged event.

System_CAPS_protmethodOnControlAdded(ControlEventArgs)

Raises the ControlAdded event.

System_CAPS_protmethodOnControlRemoved(ControlEventArgs)

Raises the ControlRemoved event.

System_CAPS_protmethodOnCreateControl()

Raises the CreateControl method.

System_CAPS_protmethodOnCursorChanged(EventArgs)

Raises the CursorChanged event.

System_CAPS_protmethodOnDockChanged(EventArgs)

Raises the DockChanged event.

System_CAPS_protmethodOnDoubleClick(EventArgs)

Raises the DoubleClick event.

System_CAPS_protmethodOnDragDrop(DragEventArgs)

Raises the DragDrop event.

System_CAPS_protmethodOnDragEnter(DragEventArgs)

Raises the DragEnter event.

System_CAPS_protmethodOnDragLeave(EventArgs)

Raises the DragLeave event.

System_CAPS_protmethodOnDragOver(DragEventArgs)

Raises the DragOver event.

System_CAPS_protmethodOnEnabledChanged(EventArgs)

Raises the EnabledChanged event.

System_CAPS_protmethodOnEnter(EventArgs)

Raises the Enter event.

System_CAPS_protmethodOnFontChanged(EventArgs)

Raises the FontChanged event.

System_CAPS_protmethodOnForeColorChanged(EventArgs)

Raises the ForeColorChanged event.

System_CAPS_protmethodOnGiveFeedback(GiveFeedbackEventArgs)

Raises the GiveFeedback event.

System_CAPS_protmethodOnGotFocus(EventArgs)

Raises the GotFocus event.

System_CAPS_protmethodOnHandleCreated(EventArgs)

Raises the HandleCreated event.

System_CAPS_protmethodOnHandleDestroyed(EventArgs)

Raises the HandleDestroyed event.

System_CAPS_protmethodOnHelpRequested(HelpEventArgs)

Raises the HelpRequested event.

System_CAPS_protmethodOnImeModeChanged(EventArgs)

Raises the ImeModeChanged event.

System_CAPS_protmethodOnInvalidated(InvalidateEventArgs)

Raises the Invalidated event.

System_CAPS_protmethodOnKeyDown(KeyEventArgs)

Raises the KeyDown event.

System_CAPS_protmethodOnKeyPress(KeyPressEventArgs)

Raises the KeyPress event.

System_CAPS_protmethodOnKeyUp(KeyEventArgs)

Raises the KeyUp event.

System_CAPS_protmethodOnLayout(LayoutEventArgs)

Raises the Layout event.

System_CAPS_protmethodOnLeave(EventArgs)

Raises the Leave event.

System_CAPS_protmethodOnLocationChanged(EventArgs)

Raises the LocationChanged event.

System_CAPS_protmethodOnLostFocus(EventArgs)

Raises the LostFocus event.

System_CAPS_protmethodOnMarginChanged(EventArgs)

Raises the MarginChanged event.

System_CAPS_protmethodOnMouseCaptureChanged(EventArgs)

Raises the MouseCaptureChanged event.

System_CAPS_protmethodOnMouseClick(MouseEventArgs)

Raises the MouseClick event.

System_CAPS_protmethodOnMouseDoubleClick(MouseEventArgs)

Raises the MouseDoubleClick event.

System_CAPS_protmethodOnMouseDown(MouseEventArgs)

Raises the MouseDown event.

System_CAPS_protmethodOnMouseEnter(EventArgs)

Raises the MouseEnter event.

System_CAPS_protmethodOnMouseHover(EventArgs)

Raises the MouseHover event.

System_CAPS_protmethodOnMouseLeave(EventArgs)

Raises the MouseLeave event.

System_CAPS_protmethodOnMouseMove(MouseEventArgs)

Raises the MouseMove event.

System_CAPS_protmethodOnMouseUp(MouseEventArgs)

Raises the MouseUp event.

System_CAPS_protmethodOnMouseWheel(MouseEventArgs)

Raises the MouseWheel event.

System_CAPS_protmethodOnMove(EventArgs)

Raises the Move event.

System_CAPS_protmethodOnNotifyMessage(Message)

Notifies the control of Windows messages.

System_CAPS_protmethodOnPaddingChanged(EventArgs)

Raises the PaddingChanged event.

System_CAPS_protmethodOnPaint(PaintEventArgs)

Raises the Paint event.

System_CAPS_protmethodOnPaintBackground(PaintEventArgs)

Paints the background of the control.

System_CAPS_protmethodOnParentBackColorChanged(EventArgs)

Raises the BackColorChanged event when the BackColor property value of the control's container changes.

System_CAPS_protmethodOnParentBackgroundImageChanged(EventArgs)

Raises the BackgroundImageChanged event when the BackgroundImage property value of the control's container changes.

System_CAPS_protmethodOnParentBindingContextChanged(EventArgs)

Raises the BindingContextChanged event when the BindingContext property value of the control's container changes.

System_CAPS_protmethodOnParentChanged(EventArgs)

Raises the ParentChanged event.

System_CAPS_protmethodOnParentCursorChanged(EventArgs)

Raises the CursorChanged event.

System_CAPS_protmethodOnParentEnabledChanged(EventArgs)

Raises the EnabledChanged event when the Enabled property value of the control's container changes.

System_CAPS_protmethodOnParentFontChanged(EventArgs)

Raises the FontChanged event when the Font property value of the control's container changes.

System_CAPS_protmethodOnParentForeColorChanged(EventArgs)

Raises the ForeColorChanged event when the ForeColor property value of the control's container changes.

System_CAPS_protmethodOnParentRightToLeftChanged(EventArgs)

Raises the RightToLeftChanged event when the RightToLeft property value of the control's container changes.

System_CAPS_protmethodOnParentVisibleChanged(EventArgs)

Raises the VisibleChanged event when the Visible property value of the control's container changes.

System_CAPS_protmethodOnPreviewKeyDown(PreviewKeyDownEventArgs)

Raises the PreviewKeyDown event.

System_CAPS_protmethodOnPrint(PaintEventArgs)

Raises the Paint event.

System_CAPS_protmethodOnQueryContinueDrag(QueryContinueDragEventArgs)

Raises the QueryContinueDrag event.

System_CAPS_protmethodOnRegionChanged(EventArgs)

Raises the RegionChanged event.

System_CAPS_protmethodOnResize(EventArgs)

Raises the Resize event.

System_CAPS_protmethodOnRightToLeftChanged(EventArgs)

Raises the RightToLeftChanged event.

System_CAPS_protmethodOnSizeChanged(EventArgs)

Raises the SizeChanged event.

System_CAPS_protmethodOnStyleChanged(EventArgs)

Raises the StyleChanged event.

System_CAPS_protmethodOnSystemColorsChanged(EventArgs)

Raises the SystemColorsChanged event.

System_CAPS_protmethodOnTabIndexChanged(EventArgs)

Raises the TabIndexChanged event.

System_CAPS_protmethodOnTabStopChanged(EventArgs)

Raises the TabStopChanged event.

System_CAPS_protmethodOnTextChanged(EventArgs)

Raises the TextChanged event.

System_CAPS_protmethodOnValidated(EventArgs)

Raises the Validated event.

System_CAPS_protmethodOnValidating(CancelEventArgs)

Raises the Validating event.

System_CAPS_protmethodOnVisibleChanged(EventArgs)

Raises the VisibleChanged event.

System_CAPS_pubmethodPerformLayout()

Forces the control to apply layout logic to all its child controls.

System_CAPS_pubmethodPerformLayout(Control, String)

Forces the control to apply layout logic to all its child controls.

System_CAPS_pubmethodPointToClient(Point)

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

System_CAPS_pubmethodPointToScreen(Point)

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

System_CAPS_pubmethodPreProcessControlMessage(Message)

Preprocesses keyboard or input messages within the message loop before they are dispatched.

System_CAPS_pubmethodPreProcessMessage(Message)

Preprocesses keyboard or input messages within the message loop before they are dispatched.

System_CAPS_protmethodProcessCmdKey(Message, Keys)

Processes a command key.

System_CAPS_protmethodProcessDialogChar(Char)

Processes a dialog character.

System_CAPS_protmethodProcessDialogKey(Keys)

Processes a dialog key.

System_CAPS_protmethodProcessKeyEventArgs(Message)

Processes a key message and generates the appropriate control events.

System_CAPS_protmethodProcessKeyMessage(Message)

Processes a keyboard message.

System_CAPS_protmethodProcessKeyPreview(Message)

Previews a keyboard message.

System_CAPS_protmethodProcessMnemonic(Char)

Processes a mnemonic character.

System_CAPS_protmethodRaiseDragEvent(Object, DragEventArgs)

This API supports the product infrastructure and is not intended to be used directly from your code. Raises the appropriate drag event.

System_CAPS_protmethodRaiseKeyEvent(Object, KeyEventArgs)

This API supports the product infrastructure and is not intended to be used directly from your code. Raises the appropriate key event.

System_CAPS_protmethodRaiseMouseEvent(Object, MouseEventArgs)

This API supports the product infrastructure and is not intended to be used directly from your code. Raises the appropriate mouse event.

System_CAPS_protmethodRaisePaintEvent(Object, PaintEventArgs)

This API supports the product infrastructure and is not intended to be used directly from your code. Raises the appropriate paint event.

System_CAPS_protmethodRecreateHandle()

Forces the re-creation of the handle for the control.

System_CAPS_pubmethodRectangleToClient(Rectangle)

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

System_CAPS_pubmethodRectangleToScreen(Rectangle)

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

System_CAPS_protmethodSystem_CAPS_staticReflectMessage(IntPtr, Message)

Reflects the specified message to the control that is bound to the specified handle.

System_CAPS_pubmethodRefresh()

Forces the control to invalidate its client area and immediately redraw itself and any child controls.

System_CAPS_pubmethodResetBackColor()

Resets the BackColor property to its default value.

System_CAPS_pubmethodResetBindings()

Causes a control bound to the BindingSource to reread all the items in the list and refresh their displayed values.

System_CAPS_pubmethodResetCursor()

Resets the Cursor property to its default value.

System_CAPS_pubmethodResetFont()

Resets the Font property to its default value.

System_CAPS_pubmethodResetForeColor()

Resets the ForeColor property to its default value.

System_CAPS_pubmethodResetImeMode()

Resets the ImeMode property to its default value.

System_CAPS_protmethodResetMouseEventArgs()

This API supports the product infrastructure and is not intended to be used directly from your code. Resets the control to handle the MouseLeave event.

System_CAPS_pubmethodResetRightToLeft()

Resets the RightToLeft property to its default value.

System_CAPS_pubmethodResetText()

Resets the Text property to its default value.

System_CAPS_pubmethodResumeLayout()

Resumes usual layout logic.

System_CAPS_pubmethodResumeLayout(Boolean)

Resumes usual layout logic, optionally forcing an immediate layout of pending layout requests.

System_CAPS_protmethodRtlTranslateAlignment(ContentAlignment)

Converts the specified ContentAlignment to the appropriate ContentAlignment to support right-to-left text.

System_CAPS_protmethodRtlTranslateAlignment(HorizontalAlignment)

Converts the specified HorizontalAlignment to the appropriate HorizontalAlignment to support right-to-left text.

System_CAPS_protmethodRtlTranslateAlignment(LeftRightAlignment)

Converts the specified LeftRightAlignment to the appropriate LeftRightAlignment to support right-to-left text.

System_CAPS_protmethodRtlTranslateContent(ContentAlignment)

Converts the specified ContentAlignment to the appropriate ContentAlignment to support right-to-left text.

System_CAPS_protmethodRtlTranslateHorizontal(HorizontalAlignment)

Converts the specified HorizontalAlignment to the appropriate HorizontalAlignment to support right-to-left text.

System_CAPS_protmethodRtlTranslateLeftRight(LeftRightAlignment)

Converts the specified LeftRightAlignment to the appropriate LeftRightAlignment to support right-to-left text.

System_CAPS_pubmethodScale(Single)

Obsolete.Scales the control and any child controls.

System_CAPS_pubmethodScale(Single, Single)

Obsolete.Scales the entire control and any child controls.

System_CAPS_pubmethodScale(SizeF)

Scales the control and all child controls by the specified scaling factor.

System_CAPS_protmethodScaleControl(SizeF, BoundsSpecified)

Scales a control's location, size, padding and margin.

System_CAPS_protmethodScaleCore(Single, Single)

This API supports the product infrastructure and is not intended to be used directly from your code. This method is not relevant for this class.

System_CAPS_pubmethodSelect()

Activates the control.

System_CAPS_protmethodSelect(Boolean, Boolean)

Activates a child control. Optionally specifies the direction in the tab order to select the control from.

System_CAPS_pubmethodSelectNextControl(Control, Boolean, Boolean, Boolean, Boolean)

Activates the next control.

System_CAPS_pubmethodSendToBack()

Sends the control to the back of the z-order.

System_CAPS_protmethodSetAutoSizeMode(AutoSizeMode)

Sets a value indicating how a control will behave when its AutoSize property is enabled.

System_CAPS_pubmethodSetBounds(Int32, Int32, Int32, Int32)

Sets the bounds of the control to the specified location and size.

System_CAPS_pubmethodSetBounds(Int32, Int32, Int32, Int32, BoundsSpecified)

Sets the specified bounds of the control to the specified location and size.

System_CAPS_protmethodSetBoundsCore(Int32, Int32, Int32, Int32, BoundsSpecified)

Performs the work of setting the specified bounds of this control.

System_CAPS_protmethodSetClientSizeCore(Int32, Int32)

Sets the size of the client area of the control.

System_CAPS_protmethodSetStyle(ControlStyles, Boolean)

Sets a specified ControlStyles flag to either true or false.

System_CAPS_protmethodSetTopLevel(Boolean)

Sets the control as the top-level control.

System_CAPS_protmethodSetVisibleCore(Boolean)

Sets the control to the specified visible state.

System_CAPS_pubmethodShow()

Displays the control to the user.

System_CAPS_protmethodSizeFromClientSize(Size)

Determines the size of the entire control from the height and width of its client area.

System_CAPS_pubmethodSuspendLayout()

Temporarily suspends the layout logic for the control.

System_CAPS_pubmethodToString()

Returns a String containing the name of the Component, if any. This method should not be overridden.(Inherited from Component.)

System_CAPS_pubmethodUpdate()

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

System_CAPS_protmethodUpdateBounds()

Updates the bounds of the control with the current size and location.

System_CAPS_protmethodUpdateBounds(Int32, Int32, Int32, Int32)

Updates the bounds of the control with the specified size and location.

System_CAPS_protmethodUpdateBounds(Int32, Int32, Int32, Int32, Int32, Int32)

Updates the bounds of the control with the specified size, location, and client size.

System_CAPS_protmethodUpdateStyles()

Forces the assigned styles to be reapplied to the control.

System_CAPS_protmethodUpdateZOrder()

Updates the control in its parent's z-order.

System_CAPS_protmethodWndProc(Message)

Processes Windows messages.

NameDescription
System_CAPS_pubeventAutoSizeChanged

This API supports the product infrastructure and is not intended to be used directly from your code. This event is not relevant for this class.

System_CAPS_pubeventBackColorChanged

Occurs when the value of the BackColor property changes.

System_CAPS_pubeventBackgroundImageChanged

Occurs when the value of the BackgroundImage property changes.

System_CAPS_pubeventBackgroundImageLayoutChanged

Occurs when the BackgroundImageLayout property changes.

System_CAPS_pubeventBindingContextChanged

Occurs when the value of the BindingContext property changes.

System_CAPS_pubeventCausesValidationChanged

Occurs when the value of the CausesValidation property changes.

System_CAPS_pubeventChangeUICues

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

System_CAPS_pubeventClick

Occurs when the control is clicked.

System_CAPS_pubeventClientSizeChanged

Occurs when the value of the ClientSize property changes.

System_CAPS_pubeventContextMenuChanged

Occurs when the value of the ContextMenu property changes.

System_CAPS_pubeventContextMenuStripChanged

Occurs when the value of the ContextMenuStrip property changes.

System_CAPS_pubeventControlAdded

Occurs when a new control is added to the Control.ControlCollection.

System_CAPS_pubeventControlRemoved

Occurs when a control is removed from the Control.ControlCollection.

System_CAPS_pubeventCursorChanged

Occurs when the value of the Cursor property changes.

System_CAPS_pubeventDisposed

Occurs when the component is disposed by a call to the Dispose method. (Inherited from Component.)

System_CAPS_pubeventDockChanged

Occurs when the value of the Dock property changes.

System_CAPS_pubeventDoubleClick

Occurs when the control is double-clicked.

System_CAPS_pubeventDragDrop

Occurs when a drag-and-drop operation is completed.

System_CAPS_pubeventDragEnter

Occurs when an object is dragged into the control's bounds.

System_CAPS_pubeventDragLeave

Occurs when an object is dragged out of the control's bounds.

System_CAPS_pubeventDragOver

Occurs when an object is dragged over the control's bounds.

System_CAPS_pubeventEnabledChanged

Occurs when the Enabled property value has changed.

System_CAPS_pubeventEnter

Occurs when the control is entered.

System_CAPS_pubeventFontChanged

Occurs when the Font property value changes.

System_CAPS_pubeventForeColorChanged

Occurs when the ForeColor property value changes.

System_CAPS_pubeventGiveFeedback

Occurs during a drag operation.

System_CAPS_pubeventGotFocus

Occurs when the control receives focus.

System_CAPS_pubeventHandleCreated

Occurs when a handle is created for the control.

System_CAPS_pubeventHandleDestroyed

Occurs when the control's handle is in the process of being destroyed.

System_CAPS_pubeventHelpRequested

Occurs when the user requests help for a control.

System_CAPS_pubeventImeModeChanged

Occurs when the ImeMode property has changed.

System_CAPS_pubeventInvalidated

Occurs when a control's display requires redrawing.

System_CAPS_pubeventKeyDown

Occurs when a key is pressed while the control has focus.

System_CAPS_pubeventKeyPress

Occurs when a character. space or backspace key is pressed while the control has focus.

System_CAPS_pubeventKeyUp

Occurs when a key is released while the control has focus.

System_CAPS_pubeventLayout

Occurs when a control should reposition its child controls.

System_CAPS_pubeventLeave

Occurs when the input focus leaves the control.

System_CAPS_pubeventLocationChanged

Occurs when the Location property value has changed.

System_CAPS_pubeventLostFocus

Occurs when the control loses focus.

System_CAPS_pubeventMarginChanged

Occurs when the control's margin changes.

System_CAPS_pubeventMouseCaptureChanged

Occurs when the control loses mouse capture.

System_CAPS_pubeventMouseClick

Occurs when the control is clicked by the mouse.

System_CAPS_pubeventMouseDoubleClick

Occurs when the control is double clicked by the mouse.

System_CAPS_pubeventMouseDown

Occurs when the mouse pointer is over the control and a mouse button is pressed.

System_CAPS_pubeventMouseEnter

Occurs when the mouse pointer enters the control.

System_CAPS_pubeventMouseHover

Occurs when the mouse pointer rests on the control.

System_CAPS_pubeventMouseLeave

Occurs when the mouse pointer leaves the control.

System_CAPS_pubeventMouseMove

Occurs when the mouse pointer is moved over the control.

System_CAPS_pubeventMouseUp

Occurs when the mouse pointer is over the control and a mouse button is released.

System_CAPS_pubeventMouseWheel

Occurs when the mouse wheel moves while the control has focus.

System_CAPS_pubeventMove

Occurs when the control is moved.

System_CAPS_pubeventPaddingChanged

Occurs when the control's padding changes.

System_CAPS_pubeventPaint

Occurs when the control is redrawn.

System_CAPS_pubeventParentChanged

Occurs when the Parent property value changes.

System_CAPS_pubeventPreviewKeyDown

Occurs before the KeyDown event when a key is pressed while focus is on this control.

System_CAPS_pubeventQueryAccessibilityHelp

Occurs when AccessibleObject is providing help to accessibility applications.

System_CAPS_pubeventQueryContinueDrag

Occurs during a drag-and-drop operation and enables the drag source to determine whether the drag-and-drop operation should be canceled.

System_CAPS_pubeventRegionChanged

Occurs when the value of the Region property changes.

System_CAPS_pubeventResize

Occurs when the control is resized.

System_CAPS_pubeventRightToLeftChanged

Occurs when the RightToLeft property value changes.

System_CAPS_pubeventSizeChanged

Occurs when the Size property value changes.

System_CAPS_pubeventStyleChanged

Occurs when the control style changes.

System_CAPS_pubeventSystemColorsChanged

Occurs when the system colors change.

System_CAPS_pubeventTabIndexChanged

Occurs when the TabIndex property value changes.

System_CAPS_pubeventTabStopChanged

Occurs when the TabStop property value changes.

System_CAPS_pubeventTextChanged

Occurs when the Text property value changes.

System_CAPS_pubeventValidated

Occurs when the control is finished validating.

System_CAPS_pubeventValidating

Occurs when the control is validating.

System_CAPS_pubeventVisibleChanged

Occurs when the Visible property value changes.

NameDescription
System_CAPS_pubinterfaceSystem_CAPS_privmethodIDropTarget.OnDragDrop(DragEventArgs)

This API supports the product infrastructure and is not intended to be used directly from your code. Raises the DragDrop event.

System_CAPS_pubinterfaceSystem_CAPS_privmethodIDropTarget.OnDragEnter(DragEventArgs)

This API supports the product infrastructure and is not intended to be used directly from your code. Raises the DragEnter event.

System_CAPS_pubinterfaceSystem_CAPS_privmethodIDropTarget.OnDragLeave(EventArgs)

This API supports the product infrastructure and is not intended to be used directly from your code. Raises the DragLeave event.

System_CAPS_pubinterfaceSystem_CAPS_privmethodIDropTarget.OnDragOver(DragEventArgs)

This API supports the product infrastructure and is not intended to be used directly from your code. Raises the DragOver event.

To create your own control class, inherit from the UserControl, Control classes, or from the other Windows Forms provided controls. For more information about authoring custom controls, see Developing Custom Windows Forms Controls with the .NET Framework.

The Control class implements very basic functionality required by classes that display information to the user. It handles user input through the keyboard and pointing devices. It handles message routing and security. It defines the bounds of a control (its position and size), although it does not implement painting. It provides a window handle (hWnd).

Windows Forms controls use ambient properties so child controls can appear like their surrounding environment. An ambient property is a control property that, if not set, is retrieved from the parent control. 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. 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. Typically, an ambient property represents a characteristic of a control, such as BackColor, that is communicated to a child control. For example, a Button will have the same BackColor as its parent Form by default. Ambient properties provided by the Controlclass include: Cursor, Font, BackColor, ForeColor, and RightToLeft.

System_CAPS_noteNote

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. 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. For an example of a manifest, see the Example section of the FlatStyle enumeration. For more information about using visual styles, seeVisual Styles.

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. Sometimes you will want to provide additional information to accessibility client applications. There are two ways of providing this additional information. You can set the AccessibleName, AccessibleDescription, AccessibleDefaultActionDescription, and AccessibleRole property values, which will be reported to accessibility client applications. This method is typically used to provide limited accessibility information for existing controls. Alternatively, you can write your own class deriving from the AccessibleObject or Control.ControlAccessibleObject classes, providing as much accessibility information as needed.

System_CAPS_noteNote

To maintain better performance, do not set the size of a control in its constructor. The preferred method is to override the DefaultSize property.

System_CAPS_noteNote

Do not add data bindings for a Control in its constructor. Doing so will cause errors in code generation and can cause unwanted behavior.

The majority of the controls in the System.Windows.Forms namespace use the underlying Windows common control as a base to build on. For more information about the Windows common controls, seeGeneral Control Reference.

To identify Windows Forms controls from a separate process, use a standard SendMessage call to pass the WM_GETCONTROLNAME message. WM_GETCONTROLNAME is independent of the language and Windows hierarchy. For more information, see the "Recommended Solution for Windows Forms" topic inAutomating Windows Forms.

Use the InvokeRequired property to synchronize access to the control from multiple threads. For more information about multithreaded Windows Forms controls, see How to: Make Thread-Safe Calls to Windows Forms Controls

.NET Framework
Available since 1.1

Only the following members are thread safe: BeginInvoke, EndInvoke, Invoke, InvokeRequired, and CreateGraphics if the handle for the control has already been created. Calling CreateGraphics before the control's handle has been created on a background thread can cause illegal cross thread calls.

Return to top
Show:
© 2016 Microsoft