Windows application ToolstripMenuItems Text Foreground Color Change When Hover Mouse in C#
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.