Export (0) Print
Expand All
Expand Minimize
This topic has not yet been rated - Rate this topic

AccessibleEvents Enumeration

Specifies events that are reported by accessible applications.

[Visual Basic]
<Serializable>
Public Enum AccessibleEvents
[C#]
[Serializable]
public enum AccessibleEvents
[C++]
[Serializable]
__value public enum AccessibleEvents
[JScript]
public
   Serializable
enum AccessibleEvents

Remarks

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 additional information on the accessibility application, search for "Microsoft Active Accessibility" in the MSDN Library.

Members

Member name Description
AcceleratorChange An object's KeyboardShortcut property changed. Server applications send the event for their accessible objects.
Create An 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.
DefaultActionChange An 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.
DescriptionChange An object's Description property changed. Server applications send this event for their accessible objects.
Destroy An 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 assume that all the children of an object have been destroyed when the parent object sends this event.
Focus An 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.
HelpChange An object's Help property changed. Server applications send this event for their accessible objects.
Hide An 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.
LocationChange An 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.
NameChange An 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.
ParentChange An object has a new parent object. Server applications send this event for their accessible objects.
Reorder A 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.
Selection An 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.
SelectionAdd An 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.
SelectionRemove An 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.
SelectionWithin Numerous 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.
Show A 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 assume 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.
StateChange An 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.
SystemAlert An 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.
SystemCaptureEnd A window has lost mouse capture. The system sends the event; servers never send this event.
SystemCaptureStart A window is being moved or resized. The system sends the event; servers never send this event.
SystemContextHelpEnd A window exited context-sensitive Help mode. The system does not send the event consistently.
SystemContextHelpStart A window entered context-sensitive Help mode. The system does not send the event consistently.
SystemDialogEnd A 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.
SystemDialogStart A 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.
SystemDragDropEnd An application is about to exit drag-and-drop mode. Applications that support drag-and-drop operations must send this event; the system does not.
SystemDragDropStart An application is about to enter drag-and-drop mode. Applications that support drag-and-drop operations must send this event; the system does not.
SystemForeground The 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.
SystemMenuEnd A menu from the menu bar was closed. The system sends this event for standard menus. Servers send this event for custom menus.
SystemMenuPopupEnd A 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.
SystemMenuPopupStart A 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.
SystemMenuStart A 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.
SystemMinimizeEnd A window object was minimized or maximized. The system sends the event; servers never send this event.
SystemMinimizeStart A window object is about to be minimized or maximized. The system sends the event; servers never send this event.
SystemMoveSizeEnd The movement or resizing of a window is finished. The system sends the event; servers never send this event.
SystemMoveSizeStart A window is being moved or resized. The system sends the event; servers never send this event.
SystemScrollingEnd Scrolling 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.
SystemScrollingStart Scrolling 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.
SystemSound A 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.
SystemSwitchEnd The 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.
SystemSwitchStart The 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.
ValueChange An 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.

Example

[Visual Basic, C#, C++] The following 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. Since 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.

[Visual Basic, C#, C++] This code excerpt demonstrates using the AccessibleEvents enumeration with the AccessibilityNotifyClients method. See the AccessibleObject class overview for the complete code example.

[Visual Basic] 
' Gets or sets the location for the curve legend.            
Public Property Location() As Point
    Get
        Return m_location
    End Get
    Set
        m_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.ExposeAccessibilityNotifyClients(AccessibleEvents.LocationChange, _
                CType(AccessibilityObject, CurveLegendAccessibleObject).ID)
    End Set
End Property

' Gets or sets the Name for the curve legend.            
Public Property Name() As String
    Get
        Return m_name
    End Get
    Set
        If m_name <> value Then
            m_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.ExposeAccessibilityNotifyClients(AccessibleEvents.NameChange, _
                    CType(AccessibilityObject, CurveLegendAccessibleObject).ID)
        End If
    End Set
End Property

' Gets or sets the Selected state for the curve legend.            
Public Property Selected() As Boolean
    Get
        Return m_selected
    End Get
    Set
        If m_selected <> value Then
            m_selected = value
            chart.Invalidate()

            ' Notifies the chart of the selection value change. This is used for
            ' the accessibility information. The AccessibleEvents value varies
            ' on whether the selection is true (AccessibleEvents.SelectionAdd) or 
            ' false (AccessibleEvents.SelectionRemove). 
            If m_selected Then
                chart.ExposeAccessibilityNotifyClients(AccessibleEvents.SelectionAdd, _
                        CType(AccessibilityObject, CurveLegendAccessibleObject).ID) 
            Else
                chart.ExposeAccessibilityNotifyClients(AccessibleEvents.SelectionRemove, _
                        CType(AccessibilityObject, CurveLegendAccessibleObject).ID) 
            End If
        End If
    End Set
End Property

[C#] 
// 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);
        }
    }
}

[C++] 
// Gets or sets the location for the curve legend.
__property Point get_Location() {
   return location;
}
__property void set_Location(Point value) {
   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,
      (dynamic_cast<CurveLegendAccessibleObject*>(AccessibilityObject))->ID);
}

// Gets or sets the Name for the curve legend.
__property String* get_Name() {
   return name;
}
__property void set_Name(String* value) {
   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,
         (dynamic_cast<CurveLegendAccessibleObject*>(AccessibilityObject))->ID);
   }
}

// Gets or sets the Selected state for the curve legend.
__property bool get_Selected() {
   return selected;
}
__property void set_Selected(bool value) {
   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,
         (dynamic_cast<CurveLegendAccessibleObject*>(AccessibilityObject))->ID);
   }
}

[JScript] No example is available for JScript. To view a Visual Basic, C#, or C++ example, click the Language Filter button Language Filter in the upper-left corner of the page.

Requirements

Namespace: System.Windows.Forms

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

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

See Also

System.Windows.Forms Namespace | AccessibleNavigation | AccessibleObject | AccessibleRole | AccessibleSelection | AccessibleStates

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.