ZForge.Controls.XPTable.Editors.DropDownCellEditor.ProcessKeyMessage C# (CSharp) Method

ProcessKeyMessage() public method

Filters out a key message before it is dispatched
public ProcessKeyMessage ( Control target, WindowMessage msg, int wParam, int lParam ) : bool
target System.Windows.Forms.Control The Control that will receive the message
msg WindowMessage A WindowMessage that represents the message to process
wParam int Specifies the WParam field of the message
lParam int Specifies the LParam field of the message
return bool
        public override bool ProcessKeyMessage(Control target, WindowMessage msg, int wParam, int lParam)
        {
            if (msg == WindowMessage.WM_KEYDOWN)
            {
                if (((Keys) wParam) == Keys.F4)
                {
                    if (this.TextBox.Focused || this.DropDown.ContainsFocus)
                    {
                        this.DroppedDown = !this.DroppedDown;

                        return true;
                    }
                }
            }

            return false;
        }