Shape.IsAccessible Property

 

Gets or sets a value indicating whether a line or shape control is available to accessibility applications.

Namespace:   Microsoft.VisualBasic.PowerPacks
Assembly:  Microsoft.VisualBasic.PowerPacks.Vs (in Microsoft.VisualBasic.PowerPacks.Vs.dll)

Syntax

[BrowsableAttribute(false)]
public bool IsAccessible { get; set; }
public:
[BrowsableAttribute(false)]
property bool IsAccessible {
    bool get();
    void set(bool value);
}
[<BrowsableAttribute(false)>]
member IsAccessible : bool with get, set
<BrowsableAttribute(False)>
Public Property IsAccessible As Boolean

Property Value

Type: System.Boolean

true if the control is available to accessibility applications; otherwise, false. The default value is true.

Remarks

When a line or shape controls is used strictly for decorative purposes and its Enabled property is set to false, you may want to set the IsAccessible property to false to minimize the effect on accessibility applications.

Examples

The following example sets the IsAccessible property of each shape in a collection to false if the Enabled property of that shape is false.

private void SetAccessibility()
{
    // Loop through the Shapes collection of the form.
    foreach (Shape s in shapeContainer1.Shapes)
    {
        // If the shape is disabled, set IsAccessible to false.
        if (s.Enabled == false)
        {
            s.IsAccessible = false;
        }
    }
}
Private Sub SetAccessibility()
    ' Loop through the Shapes collection of the form.
    For Each s As Shape In ShapeContainer1.Shapes
        ' If the shape is disabled, set IsAccessible to false.
        If s.Enabled = False Then
            s.IsAccessible = False
        End If
    Next
End Sub

See Also

Shape Class
Microsoft.VisualBasic.PowerPacks Namespace
How to: Draw Lines with the LineShape Control (Visual Studio)
How to: Draw Shapes with the OvalShape and RectangleShape Controls (Visual Studio)
Introduction to the Line and Shape Controls (Visual Studio)

Return to top