Comment : créer un objet Pen

Cet exemple crée un objet Pen.

Exemple

Dim myPen As System.Drawing.Pen
myPen = New System.Drawing.Pen(System.Drawing.Color.Tomato)
System.Drawing.Pen myPen;
myPen = new System.Drawing.Pen(System.Drawing.Color.Tomato);
System::Drawing::Pen^ myPen;
myPen = gcnew System::Drawing::Pen(System::Drawing::Color::Tomato);

Programmation fiable

Lorsque vous avez terminé, appelez Dispose sur les objets consommant des ressources système, tels que Pen.

Voir aussi

Référence

Pen

Concepts

Stylets, lignes et rectangles dans GDI+

Autres ressources

Mise en route de la programmation graphique