public static IsCursorOverNotifyIcon ( System.Windows.Forms.NotifyIcon notifyicon ) : bool | ||
notifyicon | System.Windows.Forms.NotifyIcon | The notify icon to test. |
Résultat | bool |
/// <summary> /// Hides the window /// </summary> private void HideWindow() { // note if mouse is over the notify icon when hiding the window // if it is, we will assume that the user clicked the icon to hide the window this.MouseClickToHideNotifyIcon = WindowPositioning.IsCursorOverNotifyIcon(this.NotifyIcon) && WindowPositioning.IsNotificationAreaActive; if (this.MouseClickToHideNotifyIcon) { this.MouseClickToHideNotifyIconPoint = WindowPositioning.GetCursorPosition(); } this.ReleaseHandlers(); this.Visibility = Visibility.Hidden; }