if (msg.WParam.ToInt32() == (int)Keys.Enter)
{
//MessageBox.Show(this.txt_MEMO.Focused.ToString());
if (txt_MEMO.IsEditorActive)
{
this.barButtonItem1_ItemClick(null, null);
return true;
}
else
{
SendKeys.Send("{Tab}");
return true;
}
protected override bool ProcessCmdKey(ref Message msg, Keys keyData)
{
if ( ((ActiveControl is TextBox)) && (keyData == Keys.Up || keyData == Keys.Down || keyData == Keys.Enter))
{
if (keyData == Keys.Enter)
{
System.Windows.Forms.SendKeys.Send("{TAB}");
return true;
}
if (keyData == Keys.Down)
System.Windows.Forms.SendKeys.Send("{TAB}");
else
SendKeys.Send(" {Tab}");
return true;
}
else
return base.ProcessCmdKey(ref msg, keyData);
}
protected override bool ProcessCmdKey(ref Message msg, Keys keyData)
{
if (msg.WParam.ToInt32() == (int)Keys.Enter)
{
if (lookUpEdit1.IsEditorActive && lookUpEdit1.IsPopupOpen == false)
{
this.lookUpEdit1.ShowPopup();
return true;
}
if (txt_MEMO.IsEditorActive)
{
this.barButtonItem1_ItemClick(null, null);
return true;
}
else
{
SendKeys.Send("{Tab}");
return true;
}
}
return base.ProcessCmdKey(ref msg, keyData);
}