/// <summary> /// /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void titleBarBtn_MouseLeave(object sender, EventArgs e) { Button btn = sender as Button; formToolTip.Hide(btn); btn.BackColor = MenConstants.TitleBarBtnBackColor; }
/// <summary> /// /// </summary> /// <param name="e"></param> protected override void OnMouseLeave(EventArgs e) { base.OnMouseLeave(e); this.BackColor = MenConstants.Thin; this.ChildControlRefresh(); tp.Hide(this); }
/// <summary> /// Show Tooltip /// </summary> /// <param name="mea"></param> protected override void OnMouseMove(MouseEventArgs mea) { base.OnMouseMove(mea); ToolStripItem newMouseOverItem = this.GetItemAt(mea.Location); if (mouseOverItem != newMouseOverItem || (Math.Abs(mouseOverPoint.X - mea.X) > SystemInformation.MouseHoverSize.Width || (Math.Abs(mouseOverPoint.Y - mea.Y) > SystemInformation.MouseHoverSize.Height))) { mouseOverItem = newMouseOverItem; mouseOverPoint = mea.Location; if (Tooltip != null) { Tooltip.Hide(this); } timer.Stop(); timer.Start(); } }