简体   繁体   中英

How to set Windows application ToolstripMenuItems Text Foreground Color Change When Hover Mouse in C#

Windows application ToolstripMenuItems Text Foreground Color Change When Hover Mouse in C#

我的ToolStripMenuItems。单击此处显示

Use the MouseEnter and MouseLeave event as follows:

   private void helpToolStripMenuItem_MouseEnter(object sender, EventArgs e)
    {
        helpToolStripMenuItem.ForeColor = Color.Green;
    }

   private void helpToolStripMenuItem_MouseLeave(object sender, EventArgs e)
    {
        helpToolStripMenuItem.ForeColor = Color.Black;
    }

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM