This documentation is archived and is not being maintained.

AccessibleObject.GetSelected Method

Retrieves the currently selected child.

[Visual Basic]
Public Overridable Function GetSelected() As AccessibleObject
public virtual AccessibleObject GetSelected();
public: virtual AccessibleObject* GetSelected();
public function GetSelected() : AccessibleObject;

Return Value

An AccessibleObject that represents the currently selected child. This method returns the calling object if the object itself is selected. Returns a null reference (Nothing in Visual Basic) if is no child is currently selected and the object itself does not have focus.


Exception Type Condition
COMException The selected child cannot be retrieved.


Notes to Inheritors:  All objects that can be selected should support this property.


Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

AccessibleObject Class | AccessibleObject Members | System.Windows.Forms Namespace