Thursday 23 May 2013

shortcuts in C# Windows Form

Solutions :   

private void frmPartsFormWizard_KeyDown(object sender, KeyEventArgs e)
{
            if (Control.ModifierKeys == Keys.Alt && e.KeyCode == Keys.S)
            {
                txtbox1.Focus();
            }
            else if (Control.ModifierKeys == Keys.Alt && e.KeyCode == Keys.R)
            {
                txtbox2.Focus();
            }
}

1 comment: