protected override bool processcmdkey(ref message msg,keys keydata)
{
if ( (!(activecontrol is button)) && (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 ((!(ActiveControl is Button)) && (keydata == Keys.Enter))
{
System.Windows.Forms.SendKeys.Send("{tab}");
return true;
}
else if (keydata == Keys.Down) { System.Windows.Forms.SendKeys.Send("{tab}"); return true; }
else if (keydata == Keys.Up) { SendKeys.Send("+{tab}"); return true; }
else if (keydata == (Keys.Shift | Keys.Enter))
{
SendKeys.SendWait("{Tab}");
return true;
}
return base.ProcessCmdKey(ref msg, keydata);
}
protected override bool ProcessCmdKey(ref Message msg, Keys keyData)
{
//Enter
if (keyData == Keys.Enter)
{
SendKeys.SendWait("{Tab}");
return true;
}
if (keyData == (Keys.Shift | Keys.Enter))
{
SendKeys.SendWait("{Tab}");
return true;
}
return base.ProcessCmdKey(ref msg, keyData);
}