这就需要重写MenuStrip的ProcessDialogKey方法,请参考以下代码:
代码:
public class MyMenuStrip : MenuStrip
{
protected override bool ProcessDialogKey(Keys keyData)
{
if ((keyData & Keys.Alt) == Keys.Alt)
return true;
else
return base.ProcessDialogKey(keyData);
}
}