79678509

Date: 2025-06-25 05:43:33
Score: 0.5
Natty:
Report link

I've spent ages trying to solve this, too. I've tried calling Invalidate(), setting the Focus() to the Parent control (the ToolStrip), and more. Even changing the background colour of the ToolStripButton doesn't cause it to remove the blue highlight. It looks like an unhandled scenario in the .NET code where it somehow loses track of the highlighted state when disabling and re-enabling the Form inside the button click handler.

The workaround I've found is to set sender.Visible = false, then immediately sender.Visible = true after re-enabling the Form. This seems to reset the internal state sufficiently for it to remove the highlight.

Reasons:
  • Long answer (-0.5):
  • No code block (0.5):
  • Low reputation (0.5):
Posted by: CraigF