System.Windows.Forms.Control: Method Members

The methods of System.Windows.Forms.Control are listed below. For a list of all members, see the Control Members list.

See Also: Inherited members from System.ComponentModel.Component

Public Methods

BeginInvoke(Delegate) : IAsyncResult

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

BeginInvoke(Delegate, params object[]) : IAsyncResult

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

BringToFront()

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

Contains(Control) : bool

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

CreateControl()

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

CreateGraphics() : System.Drawing.Graphics

Creates the System.Drawing.Graphics for the control.

DoDragDrop(object, DragDropEffects) : DragDropEffects

Begins a drag-and-drop operation.

DrawToBitmap(System.Drawing.Bitmap, System.Drawing.Rectangle)

Supports rendering to the specified bitmap.

EndInvoke(IAsyncResult) : object

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

FindForm() : Form

Retrieves the form that the control is on.

Focus() : bool

Sets input focus to the control.

static
FromChildHandle(IntPtr) : Control

Retrieves the control that contains the specified handle.

static
FromHandle(IntPtr) : Control

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

GetChildAtPoint(System.Drawing.Point) : Control

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

GetChildAtPoint(System.Drawing.Point, GetChildAtPointSkip) : Control

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

GetContainerControl() : IContainerControl

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

GetNextControl(Control, bool) : Control

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

GetPreferredSize(System.Drawing.Size) : System.Drawing.Size

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

Hide()

Conceals the control from the user.

Invalidate()

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

Invalidate(bool)

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.

Invalidate(System.Drawing.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.

Invalidate(System.Drawing.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.

Invalidate(System.Drawing.Rectangle, bool)

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.

Invalidate(System.Drawing.Region, bool)

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.

Invoke(Delegate) : object

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

Invoke(Delegate, params object[]) : object

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

static
IsKeyLocked(Keys) : bool

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

static
IsMnemonic(char, string) : bool

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

PerformLayout()

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

PerformLayout(Control, string)

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

PointToClient(System.Drawing.Point) : System.Drawing.Point

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

PointToScreen(System.Drawing.Point) : System.Drawing.Point

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

PreProcessControlMessage(ref Message) : PreProcessControlState
Documentation for this section has not yet been entered.
PreProcessMessage(ref Message) : bool
Documentation for this section has not yet been entered.
RectangleToClient(System.Drawing.Rectangle) : System.Drawing.Rectangle

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

RectangleToScreen(System.Drawing.Rectangle) : System.Drawing.Rectangle

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

Refresh()

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

ResetBackColor()

Resets the Control.BackColor property to its default value.

ResetBindings()

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

ResetCursor()

Resets the Control.Cursor property to its default value.

ResetFont()

Resets the Control.Font property to its default value.

ResetForeColor()

Resets the Control.ForeColor property to its default value.

ResetImeMode()

Resets the Control.ImeMode property to its default value.

ResetRightToLeft()

Resets the Control.RightToLeft property to its default value.

ResetText()

Resets the Control.Text property to its default value.

ResumeLayout()

Resumes usual layout logic.

ResumeLayout(bool)

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

Scale(System.Drawing.SizeF)

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

Scale(float)

Scales the control and any child controls.

Scale(float, float)

Scales the entire control and any child controls.

Select()

Activates the control.

SelectNextControl(Control, bool, bool, bool, bool) : bool

Activates the next control.

SendToBack()

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

SetBounds(int, int, int, int)

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

SetBounds(int, int, int, int, BoundsSpecified)

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

Show()

Displays the control to the user.

SuspendLayout()

Temporarily suspends the layout logic for the control.

Update()

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

Protected Methods

AccessibilityNotifyClients(AccessibleEvents, int)

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

AccessibilityNotifyClients(AccessibleEvents, int, int)

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

CreateAccessibilityInstance() : AccessibleObject

Creates a new accessibility object for the control.

CreateControlsInstance() : Control.ControlCollection

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

CreateHandle()

Creates a handle for the control.

DefWndProc(ref Message)
Documentation for this section has not yet been entered.
DestroyHandle()

Destroys the handle associated with the control.

override
Dispose(bool)

Releases the unmanaged resources used by the System.Windows.Forms.Control and its child controls and optionally releases the managed resources.

GetAccessibilityObjectById(int) : AccessibleObject

Retrieves the specified System.Windows.Forms.AccessibleObject.

GetAutoSizeMode() : AutoSizeMode

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

GetScaledBounds(System.Drawing.Rectangle, System.Drawing.SizeF, BoundsSpecified) : System.Drawing.Rectangle

Retrieves the bounds within which the control is scaled.

GetStyle(ControlStyles) : bool

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

GetTopLevel() : bool

Determines if the control is a top-level control.

InitLayout()

Called after the control has been added to another container.

InvokeGotFocus(Control, EventArgs)

Raises the Control.GotFocus event for the specified control.

InvokeLostFocus(Control, EventArgs)

Raises the Control.LostFocus event for the specified control.

InvokeOnClick(Control, EventArgs)

Raises the Control.Click event for the specified control.

InvokePaint(Control, PaintEventArgs)

Raises the Control.Paint event for the specified control.

InvokePaintBackground(Control, PaintEventArgs)

Raises the PaintBackground event for the specified control.

IsInputChar(char) : bool

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

IsInputKey(Keys) : bool

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

NotifyInvalidate(System.Drawing.Rectangle)

Raises the Control.Invalidated event with a specified region of the control to invalidate.

OnAutoSizeChanged(EventArgs)

Raises the Control.AutoSizeChanged event.

OnBackColorChanged(EventArgs)

Raises the Control.BackColorChanged event.

OnBackgroundImageChanged(EventArgs)

Raises the Control.BackgroundImageChanged event.

OnBackgroundImageLayoutChanged(EventArgs)

Raises the Control.BackgroundImageLayoutChanged event.

OnBindingContextChanged(EventArgs)

Raises the Control.BindingContextChanged event.

OnCausesValidationChanged(EventArgs)

Raises the Control.CausesValidationChanged event.

OnChangeUICues(UICuesEventArgs)

Raises the Control.ChangeUICues event.

OnClick(EventArgs)

Raises the Control.Click event.

OnClientSizeChanged(EventArgs)

Raises the Control.ClientSizeChanged event.

OnContextMenuChanged(EventArgs)

Raises the Control.ContextMenuChanged event.

OnContextMenuStripChanged(EventArgs)

Raises the Control.ContextMenuStripChanged event.

OnControlAdded(ControlEventArgs)

Raises the Control.ControlAdded event.

OnControlRemoved(ControlEventArgs)

Raises the Control.ControlRemoved event.

OnCreateControl()

Raises the Control.CreateControl method.

OnCursorChanged(EventArgs)

Raises the Control.CursorChanged event.

OnDockChanged(EventArgs)

Raises the Control.DockChanged event.

OnDoubleClick(EventArgs)

Raises the Control.DoubleClick event.

OnDragDrop(DragEventArgs)

Raises the Control.DragDrop event.

OnDragEnter(DragEventArgs)

Raises the Control.DragEnter event.

OnDragLeave(EventArgs)

Raises the Control.DragLeave event.

OnDragOver(DragEventArgs)

Raises the Control.DragOver event.

OnEnabledChanged(EventArgs)

Raises the Control.EnabledChanged event.

OnEnter(EventArgs)

Raises the Control.Enter event.

OnFontChanged(EventArgs)

Raises the Control.FontChanged event.

OnForeColorChanged(EventArgs)

Raises the Control.ForeColorChanged event.

OnGiveFeedback(GiveFeedbackEventArgs)

Raises the Control.GiveFeedback event.

OnGotFocus(EventArgs)

Raises the Control.GotFocus event.

OnHandleCreated(EventArgs)

Raises the Control.HandleCreated event.

OnHandleDestroyed(EventArgs)

Raises the Control.HandleDestroyed event.

OnHelpRequested(HelpEventArgs)

Raises the Control.HelpRequested event.

OnImeModeChanged(EventArgs)

Raises the Control.ImeModeChanged event.

OnInvalidated(InvalidateEventArgs)

Raises the Control.Invalidated event.

OnKeyDown(KeyEventArgs)

Raises the Control.KeyDown event.

OnKeyPress(KeyPressEventArgs)

Raises the Control.KeyPress event.

OnKeyUp(KeyEventArgs)

Raises the Control.KeyUp event.

OnLayout(LayoutEventArgs)

Raises the Control.Layout event.

OnLeave(EventArgs)

Raises the Control.Leave event.

OnLocationChanged(EventArgs)

Raises the Control.LocationChanged event.

OnLostFocus(EventArgs)

Raises the Control.LostFocus event.

OnMarginChanged(EventArgs)

Raises the Control.MarginChanged event.

OnMouseCaptureChanged(EventArgs)

Raises the Control.MouseCaptureChanged event.

OnMouseClick(MouseEventArgs)

Raises the Control.MouseClick event.

OnMouseDoubleClick(MouseEventArgs)

Raises the Control.MouseDoubleClick event.

OnMouseDown(MouseEventArgs)

Raises the Control.MouseDown event.

OnMouseEnter(EventArgs)

Raises the Control.MouseEnter event.

OnMouseHover(EventArgs)

Raises the Control.MouseHover event.

OnMouseLeave(EventArgs)

Raises the Control.MouseLeave event.

OnMouseMove(MouseEventArgs)

Raises the Control.MouseMove event.

OnMouseUp(MouseEventArgs)

Raises the Control.MouseUp event.

OnMouseWheel(MouseEventArgs)

Raises the Control.MouseWheel event.

OnMove(EventArgs)

Raises the Control.Move event.

OnNotifyMessage(Message)

Notifies the control of Windows messages.

OnPaddingChanged(EventArgs)

Raises the Control.PaddingChanged event.

OnPaint(PaintEventArgs)

Raises the Control.Paint event.

OnPaintBackground(PaintEventArgs)

Paints the background of the control.

OnParentBackColorChanged(EventArgs)

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

OnParentBackgroundImageChanged(EventArgs)

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

OnParentBindingContextChanged(EventArgs)

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

OnParentChanged(EventArgs)

Raises the Control.ParentChanged event.

OnParentCursorChanged(EventArgs)

Raises the Control.CursorChanged event.

OnParentEnabledChanged(EventArgs)

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

OnParentFontChanged(EventArgs)

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

OnParentForeColorChanged(EventArgs)

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

OnParentRightToLeftChanged(EventArgs)

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

OnParentVisibleChanged(EventArgs)

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

OnPreviewKeyDown(PreviewKeyDownEventArgs)

Raises the Control.PreviewKeyDown event.

OnPrint(PaintEventArgs)

Raises the Control.Paint event.

OnQueryContinueDrag(QueryContinueDragEventArgs)

Raises the Control.QueryContinueDrag event.

OnRegionChanged(EventArgs)

Raises the Control.RegionChanged event.

OnResize(EventArgs)

Raises the Control.Resize event.

OnRightToLeftChanged(EventArgs)

Raises the Control.RightToLeftChanged event.

OnSizeChanged(EventArgs)

Raises the Control.SizeChanged event.

OnStyleChanged(EventArgs)

Raises the Control.StyleChanged event.

OnSystemColorsChanged(EventArgs)

Raises the Control.SystemColorsChanged event.

OnTabIndexChanged(EventArgs)

Raises the Control.TabIndexChanged event.

OnTabStopChanged(EventArgs)

Raises the Control.TabStopChanged event.

OnTextChanged(EventArgs)

Raises the Control.TextChanged event.

OnValidated(EventArgs)

Raises the Control.Validated event.

OnValidating(System.ComponentModel.CancelEventArgs)

Raises the Control.Validating event.

OnVisibleChanged(EventArgs)

Raises the Control.VisibleChanged event.

ProcessCmdKey(ref Message, Keys) : bool
Documentation for this section has not yet been entered.
ProcessDialogChar(char) : bool

Processes a dialog character.

ProcessDialogKey(Keys) : bool

Processes a dialog key.

ProcessKeyEventArgs(ref Message) : bool
Documentation for this section has not yet been entered.
ProcessKeyMessage(ref Message) : bool
Documentation for this section has not yet been entered.
ProcessKeyPreview(ref Message) : bool
Documentation for this section has not yet been entered.
ProcessMnemonic(char) : bool

Processes a mnemonic character.

RaiseDragEvent(object, DragEventArgs)

Raises the appropriate drag event.

RaiseKeyEvent(object, KeyEventArgs)

Raises the appropriate key event.

RaiseMouseEvent(object, MouseEventArgs)

Raises the appropriate mouse event.

RaisePaintEvent(object, PaintEventArgs)

Raises the appropriate paint event.

RecreateHandle()

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

static
ReflectMessage(IntPtr, ref Message) : bool
Documentation for this section has not yet been entered.
ResetMouseEventArgs()

Resets the control to handle the Control.MouseLeave event.

RtlTranslateAlignment(System.Drawing.ContentAlignment) : System.Drawing.ContentAlignment

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

RtlTranslateAlignment(HorizontalAlignment) : HorizontalAlignment

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

RtlTranslateAlignment(LeftRightAlignment) : LeftRightAlignment

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

RtlTranslateContent(System.Drawing.ContentAlignment) : System.Drawing.ContentAlignment

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

RtlTranslateHorizontal(HorizontalAlignment) : HorizontalAlignment

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

RtlTranslateLeftRight(LeftRightAlignment) : LeftRightAlignment

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

ScaleControl(System.Drawing.SizeF, BoundsSpecified)

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

ScaleCore(float, float)

This method is not relevant for this class.

Select(bool, bool)

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

SetAutoSizeMode(AutoSizeMode)

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

SetBoundsCore(int, int, int, int, BoundsSpecified)

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

SetClientSizeCore(int, int)

Sets the size of the client area of the control.

SetStyle(ControlStyles, bool)

Sets a specified System.Windows.Forms.ControlStyles flag to either true or false.

SetTopLevel(bool)

Sets the control as the top-level control.

SetVisibleCore(bool)

Sets the control to the specified visible state.

SizeFromClientSize(System.Drawing.Size) : System.Drawing.Size

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

UpdateBounds()

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

UpdateBounds(int, int, int, int)

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

UpdateBounds(int, int, int, int, int, int)

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

UpdateStyles()

Forces the assigned styles to be reapplied to the control.

UpdateZOrder()

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

WndProc(ref Message)
Documentation for this section has not yet been entered.