Exemplo n.º 1
0
        protected override bool ProcessCmdKey(ref System.Windows.Forms.Message msg, System.Windows.Forms.Keys keyData)
        {
            if (OnProcessCmdKey != null)
            {
                ProcessCmdKeyEventArgs e = new ProcessCmdKeyEventArgs(ref msg, keyData);
                OnProcessCmdKey(this, e);
                msg = e.Message;
                if (e.Handled)
                {
                    return(true);
                }
            }

            return(base.ProcessCmdKey(ref msg, keyData));
        }
Exemplo n.º 2
0
        protected override bool ProcessCmdKey(ref System.Windows.Forms.Message msg, System.Windows.Forms.Keys keyData)
        {
            if(OnProcessCmdKey != null)
            {
                ProcessCmdKeyEventArgs e = new ProcessCmdKeyEventArgs(ref msg, keyData);
                OnProcessCmdKey(this, e);
                msg = e.Message;
                if(e.Handled)
                    return true;
            }

            return base.ProcessCmdKey(ref msg, keyData);
        }