I have an application with digit buttons and I want to capture the keystrokes and execute the events of those buttons. I added an event of keypress
in the window and tried to capture the key typed, but I could not.
Code:
private void CalculadoraDS2_KeyPress(object sender, KeyPressEventArgs e)
{
if(e.KeyChar.GetType == '0')
{
btn0.PerformClick();
}
}