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

'Declaration
<BrowsableAttribute(False)> _
Public Property IsAccessible As Boolean
    Get
    Set
[BrowsableAttribute(false)]
public bool IsAccessible { get; set; }
[BrowsableAttribute(false)]
public:
property bool IsAccessible {
    bool get ();
    void set (bool value);
}
[<BrowsableAttribute(false)>]
member IsAccessible : bool with get, set
function get IsAccessible () : boolean
function set IsAccessible (value : 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 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
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;
        }
    }
}

.NET Framework Security

See Also

Reference

Shape Class

Microsoft.VisualBasic.PowerPacks Namespace

Other Resources

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)