Beispiel #1
0
        public void ClearTrackedControl()
        {
            if (this.trackedControl is null)
            {
                return;
            }

            NonClientControlProperties.SetIsNCMouseOver(this.trackedControl, false);
            NonClientControlProperties.SetIsNCPressed(this.trackedControl, false);
            this.trackedControl = null;
        }
Beispiel #2
0
        public bool HoverTrackedControl(IntPtr lParam)
        {
            var controlUnderMouse = this.GetControlUnderMouse(lParam);

            if (controlUnderMouse == this.trackedControl)
            {
                return(true);
            }

            if (this.trackedControl is not null)
            {
                NonClientControlProperties.SetIsNCMouseOver(this.trackedControl, false);
                NonClientControlProperties.SetIsNCPressed(this.trackedControl, false);
            }

            this.trackedControl = controlUnderMouse;

            if (this.trackedControl is not null)
            {
                NonClientControlProperties.SetIsNCMouseOver(this.trackedControl, true);
            }

            return(true);
        }