Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to change menu hover color

How to change the Hover (mouse over) color of a Windows application menu?

Any method in C# ?

OR

Any way by using Windows API (DllImport) ?

See image :

enter image description here

like image 412
Sreekumar P Avatar asked Feb 13 '12 12:02

Sreekumar P


People also ask

How do I change the color of my menu?

To change your menu's background color, click My Sites > Personalize > Customize. Once the Customizer screen loads, click CSS. Right-click on your navigation menu and choose Inspect. An Inspector panel will appear at the bottom of your screen, where you can view your website's underlying code.

How do I change the color of hover in WordPress?

To change the hover color, please go to your Admin Dashboard>>Appearance>>Customize>>Additional CSS. In the Additional CSS, please copy and paste this CSS. In above, pink color is used. You can prefer any color as per your wish.

How do I change the color of the menu button in WordPress?

To change your button color site-wide simply log into WordPress and go to Appearance > Customize > General Theme Options > Links & Buttons to make your adjustments.

How do I add hover to my menu bar in WordPress?

To do an automatic install log in to your WordPress dashboard, navigate to the Plugins menu and click Add New. In the search field type “Menu Hover Effects” and click Search Plugins. Once you've found our plugin by GreenJayMedia you can install it by simply clicking “Install Now”.


1 Answers

You are using the MenuStrip class. You can override its renderer. Here's an example, pick your own colors please.

public partial class Form1 : Form {     public Form1() {         InitializeComponent();         menuStrip1.Renderer = new MyRenderer();     }      private class MyRenderer : ToolStripProfessionalRenderer {         public MyRenderer() : base(new MyColors()) {}     }      private class MyColors : ProfessionalColorTable {         public override Color MenuItemSelected {             get { return Color.Yellow; }         }         public override Color MenuItemSelectedGradientBegin {             get { return Color.Orange; }         }         public override Color MenuItemSelectedGradientEnd {             get { return Color.Yellow; }         }     } } 

Other properties of ProfessionalColorTable control other color elements.

like image 164
Hans Passant Avatar answered Oct 08 '22 21:10

Hans Passant