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
[C#]
public virtual AccessibleObject GetSelected();
[C++]
public: virtual AccessibleObject* GetSelected();
[JScript]
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.

Exceptions

Exception Type Condition
COMException The selected child cannot be retrieved.

Remarks

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

Requirements

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

Show: