This documentation is archived and is not being maintained.

QueryAccessibilityHelpEventArgs Class

Provides data for the QueryAccessibilityHelp event.

For a list of all members of this type, see QueryAccessibilityHelpEventArgs Members.


[Visual Basic]
Public Class QueryAccessibilityHelpEventArgs
   Inherits EventArgs
public class QueryAccessibilityHelpEventArgs : EventArgs
public __gc class QueryAccessibilityHelpEventArgs : public
class QueryAccessibilityHelpEventArgs extends EventArgs

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.


The Control class exposes a public QueryAccessibilityHelp event. You can use the properties of the QueryAccessibilityHelpEventArgs class to return custom help for a particular control to an accessible client, such as a screen reader. When you handle the QueryAccessibilityHelp event, you must set the values of the HelpNamespace, HelpKeyword, and HelpString properties to appropriate values.

Note   The HelpKeyword property should be a string representation of a numeric Help topic ID.


[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 QueryAccessibilityHelpEventArgs class with the QueryAccessibilityHelp event. See the AccessibleObject class overview for the complete code example.

[Visual Basic] 
' Handle the QueryAccessibilityHelp event.
Private Sub ChartControl_QueryAccessibilityHelp(sender As Object, _
                   e As System.Windows.Forms.QueryAccessibilityHelpEventArgs) Handles MyBase.QueryAccessibilityHelp
    e.HelpString = "Displays chart data"
End Sub 

// Handles the QueryAccessibilityHelp event.
private void ChartControl_QueryAccessibilityHelp(object sender, 
                            System.Windows.Forms.QueryAccessibilityHelpEventArgs e)
    e.HelpString = "Displays chart data";

// Handles the QueryAccessibilityHelp event.
void ChartControl_QueryAccessibilityHelp(Object* /*sender*/,
   System::Windows::Forms::QueryAccessibilityHelpEventArgs* e) {
      e->HelpString = S"Displays chart data";

[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.


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

QueryAccessibilityHelpEventArgs Members | System.Windows.Forms Namespace | Help | HelpProvider