I have a C# winform, on which I have 1 button. Now, when I run my application, the button gets focus automatically.
The problem is KeyPress event o
KeyPress
I would use one of the following:
Set the TabIndex property of the button to 0.
Set the IsDefault property of the button to true - So, It will be fired when pressing the ENTER key.