改一下就好:
Graphics g;
//Create a pen 20 pixels wide that is and purple and partially transparent.
Pen penExample = new Pen(Color.FromArgb(150, Color.Purple), 20);
//Make it a dashed pen.
Pen penExample.DashStyle = DashStyle.Dash;
//Make the ends round.
Pen penExample.StartCap = LineCap.Round;
Pen penExample.EndCap = LineCap.Round;
//Now draw a curve using the pen.
g.DrawCurve(penExample, new Point[] {
new Point(200, 140),
new Point(700, 240),
new Point(500, 340),
new Point(140, 140),
new Point(40, 340),
});
Dim g As Graphics
' Create a pen 20 pixels wide that is and purple and partially transparent.
Dim penExample As New Pen(Color.FromArgb(150, Color.Purple), 20)
' Make it a dashed pen.
Dim penExample.DashStyle As Pen = DashStyle.Dash
' Make the ends round.
Dim penExample.StartCap As Pen = LineCap.Round
Dim penExample.EndCap As Pen= LineCap.Round
' Now draw a curve using the pen
g.DrawCurve(penExample, New Point() { _
New Point(200, 140), _
New Point(700, 240), _
New Point(500, 340), _
New Point(140, 140), _
New Point(40, 340), _
})