NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

Control Properties

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

Public:

Bottom The bottom coordinate of this control.
Bounds The bounds of this control. This is the window coordinates of the control in parent client coordinates.
CanFocus Checks if this control can receive focus. The result is true if the control has a handle and if it and all of its parent controls are both visible and enabled.
CanSelect Checks if this control can be selected. The result is true if the control is contained in a form and if all of its parent controls are both visible and enabled.
Capture If this control has captured the mouse then this will return true.
CausesValidation Indicates whether entering this control causes validation on the controls requiring validation. This is set to false usually for things like the Help button, etc...
ClientRectangle The client rect of the control.
ClientSize The size of the clientRect.
ContainsFocus Indicates whether the control or one of its children currently has the system focus.
Controls Collection of child controls.
Created Returns true if the control has been created.
DisplayRectangle Returns the client rect of the display area of the control. For the base control class, this is identical to getClientRect. However, inheriting controls may want to change this if their client area differs from their display area.
Disposed Indicates that the control has been disposed, and is no longer a valid Windows control even though the object instance is still alive.
Disposing Indicates that the control is in the process of being beendisposed, and is no longer a valid Windows control even though the object instance is still alive.
Enabled The current enabled state of this control.
Focused Returns true if this control has focus.
Handle The HWND handle that this control is bound to. If the handle has not yet been created, this will force handle creation.
HandleCreated Whether or not this control has a handle associated with it.
Height The height of this control
Left The left coordinate of this control.
Location The location of this control.
ModifierKeys Retrieves the current state of the modifier keys. This will check the current state of the shift, control, and alt keys.
MouseButtons The current state of the mouse buttons. This will check the current state of the left, right, and middle mouse buttons.
MousePosition The current position of the mouse in screen coordinates.
Parent The parent of this control.
RecreatingHandle This is true if the control is currently recreating its handle.
Right The right coordinate of this control.
Site (inherited from MarshalByRefComponent) Gets or sets the site of the component.
Size The size of this control.
TabIndex The tab index of this control. A tab index may consist of any valid integer number greater than or equal to zero. If more than one control on the same parent control has the same tab index, the z-order of the controls will be used to determine the order to pick the controls.
TabStop A boolean value indicating whether the user can give the focus to this control using the TAB key.
Text The current text associated with this control.
Top Top coordinate of this control.
TopLevel true if this control is a top level window, meaning that it has no parent.
TopLevelControl The top level control that contains this control. This doesn't have to be the same as the value returned from getForm since forms can be parented to other controls.
Visible Controls whether the control is visible.
Width The width of this control.

Protected:

CreateParams Returns the CreateParams used to create the handle for this control. Inheriting classes should call base.CreateParams in the manor below:
InternalHandle Returns the current value of the handle. This may be zero if the handle has not been created.
ParkingFormHandle Determines the handle that can be used to parent this control to a hidden parking form.
WindowText The current text of the Window; if the window has not yet been created, stores it in the control. If the window has been created, stores the text in the underlying win32 control. This property should be used whenever you want to get at the win32 control's text. For all other cases, use the Text property- but note that this is overridable, and any of your code that uses it will use the overridden version in controls that subclass your own.

See Also

Control Class | System.WinForms Namespace