Export (0) Print
Expand All

Control.QueryAccessibilityHelp Event

Occurs when AccessibleObject is providing help to accessibility applications.

[Visual Basic]
Public Event QueryAccessibilityHelp As _
   QueryAccessibilityHelpEventHandler
[C#]
public event QueryAccessibilityHelpEventHandler
   QueryAccessibilityHelp;
[C++]
public: __event QueryAccessibilityHelpEventHandler*
   QueryAccessibilityHelp;

[JScript] In JScript, you can handle the events defined by a class, but you cannot define your own.

Event Data

The event handler receives an argument of type QueryAccessibilityHelpEventArgs containing data related to this event. The following QueryAccessibilityHelpEventArgs properties provide information specific to this event.

Property Description
HelpKeyword Gets or sets the Help keyword for the specified control.
HelpNamespace Gets or sets a value specifying the name of the Help file.
HelpString Gets or sets the string defining what Help to get for the AccessibleObject.

Remarks

You should use the HelpProvider class to allow users to invoke help on your accessible object by pressing the F1 key. Using the HelpProvider provides you with complete information in the QueryAccessibilityHelpEventArgs object.For more information about handling events, see Consuming Events.

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 handling 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 

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

[C++] 
// Handles the QueryAccessibilityHelp event.
private:
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.

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

Control Class | Control Members | System.Windows.Forms Namespace | GetHelpTopic

Show:
© 2014 Microsoft