Close button on Tab pages in Winforms
问题 I am trying to add a close button on the tab pages of TabControl and change the color of the close button from light gray to black when mouse hovers over it. However, the color never changes. The DrawEventArgsCustom class is created to indicate that the mouse is hovering over the close button. When it's true, the statement to change the color is executed but color never changes. private void tabControl1_DrawItem(object sender, DrawItemEventArgs e) { try { Rectangle r = e.Bounds; r = this