SystemPens.HotTrack Propriété

Définition

Obtient un Pen qui est la couleur utilisée pour désigner un élément suivi attentivement.

public:
 static property System::Drawing::Pen ^ HotTrack { System::Drawing::Pen ^ get(); };
public static System.Drawing.Pen HotTrack { get; }
static member HotTrack : System.Drawing.Pen
Public Shared ReadOnly Property HotTrack As Pen

Valeur de propriété

Pen

Pen qui est la couleur utilisée pour désigner un élément qui est « hot-tracked ».

Exemples

L’exemple de code suivant montre comment utiliser la HotTrack propriété . Pour exécuter cet exemple, collez-le dans un Windows Form. Gérez l’événement du Paint formulaire et appelez la DrawWithHotTrackPen méthode à partir de la Paint méthode de gestion des événements, en passant e comme PaintEventArgs.

private void DrawWithHotTrackPen(PaintEventArgs e)
{
    Rectangle rectangle1 = new Rectangle(10, 10, 100, 100);
    e.Graphics.DrawRectangle(SystemPens.HotTrack, rectangle1);
}
Private Sub DrawWithHotTrackPen(ByVal e As PaintEventArgs) 
    Dim rectangle1 As New Rectangle(10, 10, 100, 100)
    e.Graphics.DrawRectangle(SystemPens.HotTrack, rectangle1)

End Sub

S’applique à