/// <summary> /// On un-hightlight timer /// </summary> /// <param name="sender">sender of the event</param> /// <param name="e">even argument</param> private void OnUnhighlightTimer(object sender, EventArgs e) { int buttonIndex = _titleRenderer.TitleBarButtonIndexUnderMouse; if (buttonIndex >= 0) { Point mousePos = TitleBar.PointToClient(Control.MousePosition); _titleRenderer.UpdateTitleBarButtonIndexUnderMouse(mousePos); if (_titleRenderer.TitleBarButtonIndexUnderMouse != buttonIndex) { TitleBar.Invalidate(); } } }