DashDot style Pen : Pens : Graphics C# Source Code


Custom Search

C# Source Code » Graphics » Pens »

 

DashDot style Pen








    
 
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
using System.Drawing.Drawing2D;


public class Form1 : System.Windows.Forms.Form {
    [STAThread]
    static void Main() {
        Application.Run(new Form1());
    }

    protected override void OnPaint(PaintEventArgs e) {
        Pen p = new Pen(Color.HotPink, 10);
        p.DashStyle = DashStyle.DashDot;
        Graphics g = this.CreateGraphics();
        g.DrawEllipse(p, 10, 15, 105, 250);
    }
}

 
    
   
  
   







HTML code for linking to this page:

Follow Navioo On Twitter

C# Source Code

 Navioo Graphics
» Pens