Hey guys! :)
I have a little problem with these small white lines next to the dropdownitems of my menustrip:
![Name: Screenshot (29).png
Views: 5
Size: 7.0 KB]()
I don´t know what to override to remove them :( I already removed the right and left ones by following code:
I hope you have an idea :)
I have a little problem with these small white lines next to the dropdownitems of my menustrip:
I don´t know what to override to remove them :( I already removed the right and left ones by following code:
Code:
Private Class MyRenderer : Inherits ToolStripProfessionalRenderer
Protected Overrides Sub OnRenderToolStripBorder(e As System.Windows.Forms.ToolStripRenderEventArgs)
MyBase.OnRenderToolStripBorder(e)
Dim rc As New Rectangle(Point.Empty, e.ConnectedArea.Size)
e.Graphics.FillRectangle(Brushes.Gray, rc)
e.Graphics.DrawRectangle(Pens.Gray, 1, 0, rc.Width - 2, rc.Height - 1)
End Sub
Protected Overrides Sub OnRenderMenuItemBackground(ByVal e As System.Windows.Forms.ToolStripItemRenderEventArgs)
If My.Settings.SkinModern = True Then
If e.Item.Selected Then
Dim rc As New Rectangle(Point.Empty, e.Item.Size)
e.Graphics.FillRectangle(Brushes.SkyBlue, rc)
e.Graphics.DrawRectangle(Pens.SkyBlue, 1, 0, rc.Width - 2, rc.Height - 1)
Else
Dim rc As New Rectangle(Point.Empty, e.Item.Size)
e.Graphics.FillRectangle(Brushes.Gray, rc)
e.Graphics.DrawRectangle(Pens.Gray, 1, 0, rc.Width - 2, rc.Height - 1)
End If
End If
End Sub
End Class