Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
Expand Minimize

QueryAccessibilityHelpEventHandler Delegate

Represents the method that will handle the QueryAccessibilityHelp event of a control.

[Visual Basic]
Public Delegate Sub QueryAccessibilityHelpEventHandler( _
   ByVal sender As Object, _
   ByVal e As QueryAccessibilityHelpEventArgs _
public delegate void QueryAccessibilityHelpEventHandler(
   object sender,
   QueryAccessibilityHelpEventArgs e
public __gc __delegate void QueryAccessibilityHelpEventHandler(
   Object* sender,
   QueryAccessibilityHelpEventArgs* e

[JScript] In JScript, you can use the delegates in the .NET Framework, but you cannot define your own.

Parameters [Visual Basic, C#, C++]

The declaration of your event handler must have the same parameters as the QueryAccessibilityHelpEventHandler delegate declaration.


When you create a QueryAccessibilityHelpEventHandler delegate, you identify the method that will handle the event. To associate the event with your event handler, add an instance of the delegate to the event. The event handler is called whenever the event occurs, unless you remove the delegate. For more information about event-handler delegates, see Events and Delegates.


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

[Visual Basic] 
' Overridden to return the custom AccessibleObject 
' for the entire chart.
Protected Overrides Function CreateAccessibilityInstance() As AccessibleObject
    Return New ChartControlAccessibleObject(Me)
End Function 

// Overridden to return the custom AccessibleObject 
// for the entire chart.
protected override AccessibleObject CreateAccessibilityInstance() 
    return new ChartControlAccessibleObject(this);

// Overridden to return the custom AccessibleObject
// for the entire chart.
AccessibleObject* CreateAccessibilityInstance() {
   return new ChartControlAccessibleObject(this);

[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

System.Windows.Forms Namespace | Help

© 2015 Microsoft