Proprietà Shape.ModifierKeys

Ottiene un'indicazione di valore quale i tasti di modifica (MAIUSC, CTRL e ALT) viene premuto.

Spazio dei nomi:  Microsoft.VisualBasic.PowerPacks
Assembly:  Microsoft.VisualBasic.PowerPacks.Vs (in Microsoft.VisualBasic.PowerPacks.Vs.dll)

Sintassi

'Dichiarazione
<BrowsableAttribute(False)> _
Public Shared ReadOnly Property ModifierKeys As Keys
[BrowsableAttribute(false)]
public static Keys ModifierKeys { get; }
[BrowsableAttribute(false)]
public:
static property Keys ModifierKeys {
    Keys get ();
}
[<BrowsableAttribute(false)>]
static member ModifierKeys : Keys
static function get ModifierKeys () : Keys

Valore proprietà

Tipo: System.Windows.Forms.Keys
Una combinazione bit per bit Keys valori.l'impostazione predefinita è None.

Esempi

Nell'esempio nasconde una forma quando il tasto CTRL viene premuto quando la forma è fatto clic.Questo esempio presuppone che l'utente abbia a RectangleShape RectangleShape1 denominato in un form.

Private Sub RectangleShape1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RectangleShape1.Click
    If Shape.ModifierKeys = Keys.Control Then
        CType(sender, Shape).Hide()
    End If
End Sub
private void rectangleShape1_Click(System.Object sender, System.EventArgs e)
{
    if (Shape.ModifierKeys == Keys.Control)
    {
        ((Shape)sender).Hide();
    }
}

Sicurezza di .NET Framework

Vedere anche

Riferimenti

Shape Classe

Spazio dei nomi Microsoft.VisualBasic.PowerPacks

Altre risorse

Procedura: disegnare linee con il controllo LineShape (Visual Studio)

Procedura: disegnare forme con i controlli OvalShape e RectangleShape (Visual Studio)

Introduzione ai controlli Line e Shape (Visual Studio)