準備
(なし)
デザイン
1. フォーム (Form1) にボタン (button1) を配置します。
サンプルコード (C#)
// 名前空間の追加
using System.Drawing.Drawing2D;
// コード
private void button1_Click(object sender, EventArgs e)
{
Graphics g = this.CreateGraphics();
Pen pen = new Pen(Color.Red, 2);
GraphicsPath path = new GraphicsPath();
path.StartFigure();
path.AddLine(10, 10, 200, 30);
path.CloseFigure();
g.DrawPath(pen, path);
}
解説
パスを描画します。
結果

動作確認環境
Visual Studio 2015 Professional (C# 6.0)