Nitu Sigh

Nitu Sigh

  • 1.7k
  • 11
  • 123

Key even/Key Down event on Message dialog box

Dec 2 2024 4:10 AM

Hi,

Actucally I am looking for how to get dialog box reasult with key down event?

After pressing submit button , Message dialog box woking fine..But  i want  numbers 1,2,3  shoild work similar like below ..

if (dr == DialogResult.Yes)
{
    label2.Text = " You have purchased the software , congratualtions";
}  /// working fine

but how to get dr data in keydown event of same button 

if(e.KeyCode == Keys.NumPad1) {

label2.Text = " You have purchased the software , congratualtions";

}


Answers (2)