ComponentFactory.Krypton.Toolkit.SeparatorMessageFilter.PreFilterMessage C# (CSharp) Method

PreFilterMessage() private method

private PreFilterMessage ( Message &m ) : bool
m System.Windows.Forms.Message
return bool
        public bool PreFilterMessage(ref Message m)
        {
            // We are only interested in filtering when moving the separator
            if (!_controller.IsMoving)
                return false;

            // We allow all non-keyboard messages
            if ((m.Msg < 0x100) || (m.Msg > 0x108))
                return false;

            // If the user presses the escape key, windows keys or any system key
            if (((m.Msg == 0x100) && (((int)m.WParam.ToInt64()) == 0x1B)) ||
                ((m.Msg == 0x100) && (((int)m.WParam.ToInt64()) == 0x5B)) ||
                (m.Msg == 0x104))
            {
                _controller.AbortMoving();
            }

            // We filter out all keyboard messages
            return true;
        }