internal void OnAutoHide(bool show) { if (show && !IsActivated) { // start the timer uint hovertime = 0; User32.SystemParametersInfo(Win32.SystemParametersInfoActions.GetMouseHoverTime, 0, ref hovertime, 0); // assign a default value 400 in case of setting Timer.Interval invalid value exception if (((int)hovertime) <= 0) { hovertime = 400; } m_timerMouseTrack.Interval = 2 * (int)hovertime; m_timerMouseTrack.Enabled = true; } else { // stop the timer m_timerMouseTrack.Enabled = false; } }
private void SetTimerMouseTrack() { if (ActivePane == null || ActivePane.IsActivated || FlagDragging) { m_timerMouseTrack.Enabled = false; return; } // start the timer uint hovertime = 0; User32.SystemParametersInfo(Win32.SystemParametersInfoActions.GetMouseHoverTime, 0, ref hovertime, 0); // assign a default value 400 in case of setting Timer.Interval invalid value exception if (((int)hovertime) <= 0) { hovertime = 400; } m_timerMouseTrack.Interval = 2 * (int)hovertime; m_timerMouseTrack.Enabled = true; }