共用方式為


Shape.Select Method

Enables a control.

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

Syntax

'宣告
Public Sub Select
public void Select()
public:
void Select()
member Select : unit -> unit 
public function Select()

Remarks

The Select method enables the control if it is contained in another control and all its parent controls are both visible and enabled.

Examples

The following example selects the specified Shape, if it can be selected.

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
public void SelectShape(Microsoft.VisualBasic.PowerPacks.Shape shape)
{
    // Select the control, if it can be selected.
    if (shape.CanSelect)
    {
        shape.Select();
    }
}

.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)