void image_ImageMouseMove(object sender, ImageMouseMoveEventArgs e) { if ((sender as CaptionImage).Name == "CaptionImage7") { if (this.WindowState == FormWindowState.Maximized) { tooltip.Text = "Restore Down"; } else { tooltip.Text = "Maximize"; } Point pt = new Point(e.Location.X, e.Location.Y - 35); tooltip.ShowPopup(PointToScreen(pt)); } if ((sender as CaptionImage).Name == "CaptionImage6") { tooltip.Text = "Close"; Point pt = new Point(e.Location.X, e.Location.Y - 35); tooltip.ShowPopup(PointToScreen(pt)); } if ((sender as CaptionImage).Name == "CaptionImage8") { tooltip.Text = "Minimize"; Point pt = new Point(e.Location.X, e.Location.Y - 35); tooltip.ShowPopup(PointToScreen(pt)); } }
/// <summary> /// Evento quando o mouse se move /// </summary> /// <param name="sender"></param> /// <param name="e"></param> void ImageMouseMove(object sender, ImageMouseMoveEventArgs e) { if ((sender as CaptionImage).Name == "CaptionImage1") { tooltip.Text = "Configurações"; Point pt = new Point(e.Location.X, e.Location.Y - 35); tooltip.ShowPopup(PointToScreen(pt)); } }