Export (0) Print
Expand All

AccessibleEvents Enumeration

Specifies events that are reported by accessible applications.

Namespace:  System.Windows.Forms
Assembly:  System.Windows.Forms (in System.Windows.Forms.dll)

public enum AccessibleEvents

Member nameDescription
AcceleratorChangeAn object's KeyboardShortcut property changed. Server applications send the event for their accessible objects.
CreateAn object was created. The operating system sends the event for the following user interface elements: caret, header control, list view control, tab control, toolbar control, tree view control, and window object. Server applications send this event for their accessible objects. Servers must send this event for all an object's child objects before sending the event for the parent object. Servers must ensure that all child objects are fully created and ready to accept calls from clients when the parent object sends the event.
DefaultActionChangeAn object's DefaultAction property changed. The system sends this event for dialog boxes. Server applications send this event for their accessible objects. Therefore, server applications do not need to send this event for the child objects. Hidden objects have a state of AccessibleStates.Invisible, and shown objects do not. Events of type AccessibleEvents.Hide indicate that a state of AccessibleStates.Invisible has been set. Therefore, servers do not need to send the AccessibleEvents.StateChange event in this case.
DescriptionChangeAn object's Description property changed. Server applications send this event for their accessible objects.
DestroyAn object was destroyed. The system sends this event for the following user interface elements: caret, header control, list view control, tab control, toolbar control, tree view control, and window object. Server applications send this event for their accessible objects. This event may or may not be sent for child objects. However, clients can conclude that all the children of an object have been destroyed when the parent object sends this event.
FocusAn object has received the keyboard focus. The system sends this event for the following user interface elements: list view control, menu bar, shortcut menu, switch window, tab control, tree view control, and window object. Server applications send this event for their accessible objects.
HelpChangeAn object's Help property changed. Server applications send this event for their accessible objects.
HideAn object is hidden. The system sends the event for the following user interface elements: caret and cursor. Server applications send the event for their accessible objects. When the event is generated for a parent object, all child objects have already been hidden. Therefore, server applications do not need to send the event for the child objects. The system does not send the event consistently.
LocationChangeAn object has changed location, shape, or size. The system sends this event for the following user interface elements: caret and window object. Server applications send this event for their accessible objects. This event is generated in response to the top-level object within the object hierarchy that has changed, not for any children it might contain. For example, if the user resizes a window, the system sends this notification for the window, but not for the menu bar, title bar, scroll bars, or other objects that have also changed. The system does not send this event for every non-floating child window when the parent moves. However, if an application explicitly resizes child windows as a result of being resized, the system sends multiple events for the resized children. If an object's State property is set to AccessibleStates.Floating, servers should send a location change event whenever the object changes location. If an object does not have this state, servers should raise this event when the object moves relative to its parent.
NameChangeAn object's Name property changed. The system sends this event for the following user interface elements: check box, cursor, list view control, push button, radio button, status bar control, tree view control, and window object. Server applications send this event for their accessible objects.
ParentChangeAn object has a new parent object. Server applications send this event for their accessible objects.
ReorderA container object has added, removed, or reordered its children. The system sends this event for the following user interface elements: header control, list view control, toolbar control, and window object. Server applications send this event as appropriate for their accessible objects. This event is also sent by a parent window when the z order for the child windows changes.
SelectionAn accessible object within a container object has been selected. This event signals a single selection. Either a child has been selected in a container that previously did not contain any selected children, or the selection has changed from one child to another.
SelectionAddAn item within a container object was added to the selection. The system sends this event for the following user interface elements: list box, list view control, and tree view control. Server applications send this event for their accessible objects. This event signals that a child has been added to an existing selection.
SelectionRemoveAn item within a container object was removed from the selection. The system sends this event for the following user interface elements: list box, list view control, and tree view control. Server applications send this event for their accessible objects. This event signals that a child has been removed from an existing selection.
SelectionWithinNumerous selection changes occurred within a container object. The system sends this event for list boxes. Server applications send this event for their accessible objects. This event can be sent when the selected items within a control have changed substantially. This event informs the client that many selection changes have occurred. This is preferable to sending several SelectionAdd or SelectionRemove events.
ShowA hidden object is being shown. The system sends this event for the following user interface elements: caret, cursor, and window object. Server applications send this event for their accessible objects. Clients can conclude that, when this event is sent by a parent object, all child objects have already been displayed. Therefore, server applications do not need to send this event for the child objects.
StateChangeAn object's state has changed. The system sends the event for the following user interface elements: check box, combo box, header control, push button, radio button, scroll bar, toolbar control, tree view control, up-down control, and window object. Server applications send the event for their accessible objects. For example, a state change can occur when a button object has been pressed or released, or when an object is being enabled or disabled. The system does not send the event consistently.
SystemAlertAn alert was generated. Server applications send this event whenever an important user interface change has occurred that a user might need to know about. The system does not send the event consistently for dialog box objects.
SystemCaptureEndA window has lost mouse capture. The system sends the event; servers never send this event.
SystemCaptureStartA window is being moved or resized. The system sends the event; servers never send this event.
SystemContextHelpEndA window exited context-sensitive Help mode. The system does not send the event consistently.
SystemContextHelpStartA window entered context-sensitive Help mode. The system does not send the event consistently.
SystemDialogEndA dialog box was closed. The system does not send the event for standard dialog boxes. Servers send this event for custom dialog boxes. The system does not send the event consistently.
SystemDialogStartA dialog box was displayed. The system sends the event for standard dialog boxes. Servers send this event for custom dialog boxes. The system does not send the event consistently.
SystemDragDropEndAn application is about to exit drag-and-drop mode. Applications that support drag-and-drop operations must send this event; the system does not.
SystemDragDropStartAn application is about to enter drag-and-drop mode. Applications that support drag-and-drop operations must send this event; the system does not.
SystemForegroundThe foreground window changed. The system sends this event even if the foreground window is changed to another window in the same thread. Server applications never send this event.
SystemMenuEndA menu from the menu bar was closed. The system sends this event for standard menus. Servers send this event for custom menus.
SystemMenuPopupEndA shortcut menu was closed. The system sends this event for standard menus. Servers send this event for custom menus. When a shortcut menu is closed, the client receives this message followed almost immediately by the SystemMenuEnd event. The system does not send the event consistently.
SystemMenuPopupStartA shortcut menu was displayed. The system sends this event for standard menus. Servers send this event for custom menus. The system does not send the event consistently.
SystemMenuStartA menu item on the menu bar was selected. The system sends this event for standard menus. Servers send this event for custom menus. The system might raise more than one MenuStart event that might or might not have a corresponding MenuEnd event.
SystemMinimizeEndA window object was minimized or maximized. The system sends the event; servers never send this event.
SystemMinimizeStartA window object is about to be minimized or maximized. The system sends the event; servers never send this event.
SystemMoveSizeEndThe movement or resizing of a window is finished. The system sends the event; servers never send this event.
SystemMoveSizeStartA window is being moved or resized. The system sends the event; servers never send this event.
SystemScrollingEndScrolling has ended on a scroll bar. The system sends this event for scroll bars attached to a window and for standard scroll bar controls. Servers send this event for custom scroll bars.
SystemScrollingStartScrolling has started on a scroll bar. The system sends the event for scroll bars attached to a window and for standard scroll bar controls. Servers send this event for custom scroll bars.
SystemSoundA sound was played. The system sends this event when a system sound, such as for menus, is played, even if no sound is audible. This might be caused by lack of a sound file or sound card. Servers send this event if a custom user interface element generates a sound.
SystemSwitchEndThe user released ALT+TAB. The system sends the SwitchEnd event; servers never send this event. If only one application is running when the user presses ALT+TAB, the system sends the SwitchEnd event without a corresponding SwitchStart event.
SystemSwitchStartThe user pressed ALT+TAB, which activates the switch window. If only one application is running when the user presses ALT+TAB, the system raises the SwitchEnd event without a corresponding SwitchStart event.
ValueChangeAn object's Value property changed. The system raises the ValueChange event for the following user interface elements: edit control, header control, hot key control, progress bar control, scroll bar, slider control, and up-down control. Server applications send this event for their accessible objects.

The operating system and accessibility server applications generate accessibility events in response to changes in the user interface.

This enumeration is used by AccessibleObject and Control.

For more information about the accessibility application, search for "Microsoft Active Accessibility" in the MSDN Library.

The following code example demonstrates the creation of an accessibility-aware chart control, using the AccessibleObject and Control.ControlAccessibleObject classes to expose accessible information. The control plots two curves along with a legend. The ChartControlAccessibleObject class, which derives from ControlAccessibleObject, is used in the CreateAccessibilityInstance method to provide custom accessible information for the chart control. Because the chart legend is not an actual Control -based control, but instead is drawn by the chart control, it does not any built-in accessible information. Because of this, the ChartControlAccessibleObject class overrides the GetChild method to return the CurveLegendAccessibleObject that represents accessible information for each part of the legend. When an accessible-aware application uses this control, the control can provide the necessary accessible information.

This example demonstrates using the AccessibleEvents enumeration with the AccessibilityNotifyClients method. See the AccessibleObject class overview for the complete code example.

// Gets or sets the location for the curve legend. 
public Point Location
{   
    get {
        return location;
    }
    set {
        location = value;
        chart.Invalidate();

        // Notifies the chart of the location change. This is used for 
        // the accessibility information. AccessibleEvents.LocationChange 
        // tells the chart the reason for the notification.

        chart.AccessibilityNotifyClients(AccessibleEvents.LocationChange, 
            ((CurveLegendAccessibleObject)AccessibilityObject).ID);
    }
}            

// Gets or sets the Name for the curve legend. 
public string Name
{   
    get {
        return name;
    }
    set {
        if (name != value) 
        {
            name = value;
            chart.Invalidate();

            // Notifies the chart of the name change. This is used for 
            // the accessibility information. AccessibleEvents.NameChange 
            // tells the chart the reason for the notification.

            chart.AccessibilityNotifyClients(AccessibleEvents.NameChange, 
                ((CurveLegendAccessibleObject)AccessibilityObject).ID);
        }
    }
}

// Gets or sets the Selected state for the curve legend. 
public bool Selected
{   
    get {
        return selected;
    }
    set {
        if (selected != value) 
        {
            selected = value;
            chart.Invalidate();

            // Notifies the chart of the selection value change. This is used for 
            // the accessibility information. The AccessibleEvents value depends upon 
            // if the selection is true (AccessibleEvents.SelectionAdd) or  
            // false (AccessibleEvents.SelectionRemove).
            chart.AccessibilityNotifyClients(
                selected ? AccessibleEvents.SelectionAdd : AccessibleEvents.SelectionRemove, 
                ((CurveLegendAccessibleObject)AccessibilityObject).ID);
        }
    }
}

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0, 1.1, 1.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft