各位:C#怎样画虚线啊!
C#怎样画虚线啊?
private void Form1_Paint(object sender, System.Windows.Forms.PaintEventArgs e)
{
float[] dashValues = {5, 2, 15, 4};
Pen blackPen = new Pen(Color.Black, 5);
blackPen.DashPattern = dashValues;
e.Graphics.DrawLine(blackPen, new Point(5, 5), new Point(405, 5));
}