事前準備
フォームにPictureBoxを貼り付け、
DockをFillにする。
BackColorをWhiteにする。
Imports System.Drawing.Drawing2D
Public Class Form1
Private myArrowS As New AdjustableArrowCap(10, 6)
Private customArrowS As CustomLineCap = myArrowS
Private myArrowE As New AdjustableArrowCap(20, 10, False)
Private customArrowE As CustomLineCap = myArrowS
Private capPen As New Pen(Color.Black)
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
capPen.CustomStartCap = myArrowS
capPen.CustomEndCap = myArrowE
End Sub
Private Sub PictureBox1_Paint(ByVal sender As System.Object, ByVal e As PaintEventArgs) Handles PictureBox1.Paint
e.Graphics.DrawLine(capPen, 20, 100, 100, 100)
End Sub
End Class
始点側の矢印を塗りつぶし、終点側の矢印を塗りつぶさない形にしてみました。