# The desktop control hierarchy

The built-in controls have an inheritance hierarchy. The base class is called `DesktopControl</api/user_interface/desktop/desktopcontrol>` and it contains several common events, properties and methods. `DesktopUIControl</api/user_interface/desktop/desktopuicontrol>` subclasses DesktopControl and adds additional events, properties and methods. Most desktop controls subclass `DesktopUIControl</api/user_interface/desktop/desktopuicontrol>`, although a few have another subclass in between.

Below is a list of some of the common events, properties and methods that are available for UI controls.

![image](images/the_desktop_control_hierarchy_new_desktop_control_heirarchy.png)

## DesktopControl

`DesktopControl</api/user_interface/desktop/desktopcontrol>` is the base class for all desktop controls. Refer to the `Desktop Control</api/user_interface/desktop/desktopcontrol>` for details on all its events, properties and methods.

### Events

`Closing<desktopcontrol.closing>` - Called when the control is closing because the layout upon which it rests is closing.

`Opening<desktopcontrol.opening>` - Called when the control is opening because the layout upon which it rests is opening. Use this to do any control initialization.

### Properties

`Handle<desktopcontrol.handle>` - The handle can be used to interface with OS APIs using the `Declare</api/language/declare>` command.

`Index<desktopcontrol.index>` - The Index is used with Control Sets.

`Name<desktopcontrol.name>` - The name of the control.

`Scope<desktopcontrol.scope>` - Set to Public or Private. Private controls cannot be accessed outside the Window.

`Window<desktopcontrol.window>` - Identifies the parent window of the control.

### Methods

`Close<desktopcontrol.close>` - Call this method to remove the control from the window.

## DesktopUIControl

`DesktopUIControl</api/user_interface/desktop/desktopuicontrol>` is a subclass of DesktopControl. Most controls that can appear on a Window are subclassed from DesktopUIControl. Refer to the `Desktop Control</api/user_interface/desktop/desktopuicontrol>` for details on all its events, properties and methods.

<div id="/topics/user_interface/desktop/the_desktop_control_hierarchy/see_also">

<div class="seealso">

`Windows</topics/user_interface/desktop/windows>` topic

</div>

</div>
