Export (0) Print
Expand All
Expand Minimize

Control Methods

The methods of the Control class are listed here. For a complete list of Control class members, see the Control Members topic.

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.

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:
© 2014 Microsoft