hi, I'm just trying to make the Cancel button on my form close that form on Enter key
but the problem is that it closes it when i hit space key and if i change code below to
if (e.KeyChar == (char)Keys.Return) this.Close();
it does not work.
it just works for the space key.
any help would be usefull.
private void Cancel_KeyPress(object sender, KeyPressEventArgs e)
{
if (e.KeyChar == (char)Keys.Space) this.Close();
}