标签:
1、 WinForm下给窗体和按钮添加快捷键
Private void btnExit_KeyPress( Object sender , KeyPressEventArgs e )
{
If( Control.ModifierKeys == Keys.Alt && e.KeyChar==Keys.Q )
{
e.Handled = true ;
btnExit_Click( null ,null );
}
}
标签:
原文地址:http://www.cnblogs.com/bianyanbing/p/4775047.html