I did it this way :
Imports Microsoft.VisualBasic
Imports System
Imports System.Drawing
Imports System.Drawing.Drawing2D
Imports System.Runtime.Serialization
' LEADTOOLS namespaces
Imports Leadtools
Imports Leadtools.Annotations
Imports Leadtools.WinForms
Imports Leadtools.Codecs
Imports Leadtools.Internal
<Serializable()> _
Public Class MyAnnFlecheAbbObject : Inherits AnnLineObject ' must derive from AnnObject or one of its derived classes
'
' constructor
'
Public Sub New() ' no, we do not require a font
MyBase.New(True, True, False)
' initialize the points
End Sub
'
Protected Overrides Function Create() As AnnObject
' must return a new instance of our class
Return New MyAnnFlecheAbbObject()
End Function
Public Overrides Function Clone() As Object
' override the clone method
' first call the base implementation
Dim obj As MyAnnFlecheAbbObject = CType(IIf(TypeOf MyBase.Clone() Is MyAnnFlecheAbbObject, MyBase.Clone(), Nothing), MyAnnFlecheAbbObject)
' next, copy the points
Return obj
End Function
Function custcap() As CustomLineCap
Dim hPath As New GraphicsPath()
Dim myArray As Point() = {New Point(-2, -7), New Point(2, -7), New Point(0, 0), New Point(-2, -7), New Point(-1, -7), New Point(0, 0), New Point(1, -7), New Point(0, 0), New Point(0, -7), New Point(0, 0)}
hPath.AddPolygon(myArray)
' Construct the hook-shaped end cap.
Dim HookCap As New CustomLineCap(Nothing, hPath)
' Set the start cap and end cap of the HookCap to be rounded.
'HookCap.SetStrokeCaps(LineCap.Triangle, LineCap.Triangle)
HookCap.StrokeJoin = LineJoin.Bevel
Return HookCap
End Function
Protected Overrides Sub DrawObject(ByVal graphics As System.Drawing.Graphics)
'MyBase.DrawObject(graphics)
Dim vpen As Pen
Dim vs As System.Drawing.Drawing2D.GraphicsState = Me.BeginDraw(graphics)
vpen = New Pen(Me.Pen.Color, Me.Pen.Width.Value)
vpen.StartCap = Me.Pen.StartCap
vpen.EndCap = Me.Pen.EndCap
If Me.Pen.EndCap = LineCap.Custom Then
vpen.EndCap = LineCap.Custom
vpen.CustomEndCap = custcap()
End If
If Me.Pen.StartCap = LineCap.Custom Then
vpen.StartCap = LineCap.Custom
vpen.CustomStartCap = custcap()
End If
vpen.DashStyle = Me.Pen.DashStyle
graphics.DrawPath(vpen, Me.GetGraphicsPath(AnnGetGraphicsPathMode.DrawObject))
Me.EndDraw(graphics, vs)
End Sub
End Class
'End Namespace