BrightnessTray.WindowPositioning.IsPointInNotifyIcon C# (CSharp) Method

IsPointInNotifyIcon() public static method

Checks whether a point is within the bounds of the specified notify icon.
public static IsPointInNotifyIcon ( Point point, System.Windows.Forms.NotifyIcon notifyicon ) : bool
point Point Point to check.
notifyicon System.Windows.Forms.NotifyIcon Notify icon to check.
return bool
        public static bool IsPointInNotifyIcon(Point point, NotifyIcon notifyicon)
        {
            Rect? nirect = GetNotifyIconRectangle(notifyicon);
            if (nirect == null)
                return false;
            return ((Rect)nirect).Contains(point);
        }