Thank you very much.

As the title suggests, place the mouse when the ContextMeun item Enabled = True,
I want to change the color when selected, but I don't know how.
Will it change with properties?

I want to change the color of the ↑ paste (Paste.Enabled = True)

(Copy.Enabled = False)

Thank you.

  • Answer # 1

    You can specify a color using ProfessionalColorTable.

    You can change the background color to red when the menu is selected by the following method.

    Private Sub Form1_Load (sender As Object, e As EventArgs) Handles MyBase.Load
            Dim table As ProfessionalColorTable = New ProfessionalColorTableEx ()
            ContextMenuStrip1.Renderer = New ToolStripProfessionalRenderer (table)
        End Sub
        Private Class ProfessionalColorTableEx
            Inherits ProfessionalColorTable
            Public Overrides ReadOnly Property MenuItemSelected As Color
                    Return Color.Red
                End Get
            End Property
        End Class