views:

28

answers:

1

Is there a way to remove the LineShape shadow effect when selecting the lineShape?

alt text

I tried

  Protected Overrides Sub OnPaint(ByVal e As System.Windows.Forms.PaintEventArgs)
    Dim g As Graphics = e.Graphics
    g.SmoothingMode = SmoothingMode.AntiAlias
    Dim oldmode As SmoothingMode = g.SmoothingMode
    g.DrawLine(_Pen, X1, Y1, X2, Y2)
    g.SmoothingMode = oldmode
  End Sub

but finally, this have some back effects on invalidation: when moving (in a panel) the line leave traces - does not invalidate properly.

+1  A: 

Change the SelectionColor to Transparent.

AMissico