Public Class MenuPrincipalRender
    Inherits System.Windows.Forms.ToolStripRenderer
    'Protected Overrides Sub OnRenderItemText(ByVal e As ToolStripItemTextRenderEventArgs)
    '    e.TextColor = Color.Red
    '    e.TextFont = New Font("Helvetica", 7, FontStyle.Bold)
    '    MyBase.OnRenderItemText(e)
    'End Sub



    Protected Overrides Sub OnRenderMenuItemBackground(ByVal e As ToolStripItemRenderEventArgs)
        Dim oBrush As Brush
        'oBrush = New Drawing.SolidBrush(Color.FromArgb(100, 42, 46, 54))
        oBrush = New Drawing.SolidBrush(Color.FromArgb(100, 68, 71, 78))

        If Not e.Item.Selected Then
            e.Item.BackColor = Color.Blue
        Else
            Dim rc As Rectangle = New Rectangle(Point.Empty, e.Item.Size)
            e.Graphics.FillRectangle(oBrush, rc)

            'e.Graphics.DrawRectangle(Pens.Black, 1, 0, (rc.Width - 2), (rc.Height - 1))
            'e.Item.BackColor = Color.Gray
            'e.Item.ForeColor = Color.Red
        End If
    End Sub




End Class
