Cómo: Crear un lápiz
Este ejemplo crea un objeto Pen.
Ejemplo
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);
Programación eficaz
Cuando haya dejado de utilizar objetos que consumen recursos del sistema, como Pen, debe llamar a Dispose en dichos objetos.
Vea también
Referencia
Conceptos
Lápices, líneas y rectángulos en GDI+