Creates a new accessibility object for the control.
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
Protected Overridable Function CreateAccessibilityInstance As AccessibleObjectprotected virtual AccessibleObject CreateAccessibilityInstance()protected:
virtual AccessibleObject^ CreateAccessibilityInstance()abstract CreateAccessibilityInstance : unit -> AccessibleObject
override CreateAccessibilityInstance : unit -> AccessibleObject If you do not explicitly call the CreateAccessibilityInstance method, it will be called when the AccessibilityObject property is referenced.
Note |
|---|
To get or set the AccessibilityObject property, you must add a reference to the Accessibility assembly installed with the .NET Framework. |
When overriding CreateAccessibilityInstance in a derived class, do not call the base class's CreateAccessibilityInstance method.
The following code example demonstrates the creation of an accessibility-aware chart control, using the AccessibleObject and Control
This code excerpt demonstrates overriding the CreateAccessibilityInstance method. See the AccessibleObject class overview for the complete code example.
' 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);
}
protected:
// Overridden to return the custom AccessibleObject
// for the entire chart.
virtual AccessibleObject^ CreateAccessibilityInstance() override
{
return gcnew ChartControlAccessibleObject( this );
}
Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Note