Shape.CanSelect Property
Gets a value indicating whether a line or shape control can be selected.
Namespace: Microsoft.VisualBasic.PowerPacks
Assembly: Microsoft.VisualBasic.PowerPacks.Vs (in Microsoft.VisualBasic.PowerPacks.Vs.dll)
Syntax
[BrowsableAttribute(false)]
public bool CanSelect { get; }
public:
[BrowsableAttribute(false)]
property bool CanSelect {
bool get();
}
[<BrowsableAttribute(false)>]
member CanSelect : bool with get
<BrowsableAttribute(False)>
Public ReadOnly Property CanSelect As Boolean
Property Value
Type: System.Boolean
true if the control can be selected; otherwise, false. The default is true.
Remarks
This property returns true if the control itself is visible and enabled, and all its parent controls are visible and enabled.
To prevent an individual control from being selected, set its Enabled property to false.
Examples
The following example selects the specified Shape, if it can be selected.
public void SelectShape(Microsoft.VisualBasic.PowerPacks.Shape shape)
{
// Select the control, if it can be selected.
if (shape.CanSelect)
{
shape.Select();
}
}
Public Sub SelectShape(ByVal shape As Microsoft.VisualBasic.PowerPacks.Shape)
' Select the control, if it can be selected.
If shape.CanSelect Then
shape.Select()
End If
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