C
C#14mo ago
Walter

❔ ✅ Help with case for Enter keybind not working, WinFormsApp

not sure how I make my github files public for people to see and not edit so here we go: for some reason the case Keys.Enter: dosn't do what I expect it too, there's no errors, and it's the same thing I've done with all other cases that work, but specifically the Enter case seems to be pressing the last pressed button be pressed again, that button starting of as being button 1. could this be due to the enter key instead of doing the switch case it's soposed to pressing a "selected" button instead automatically starting with having the btn_1 being selected?
4 Replies
Walter
WalterOP14mo ago
can find the case at the bottom of the Form1_keyDown function
Omnissiah
Omnissiah14mo ago
there are too many comments what is stuff like this useful for
// Set KeyPreview to true
this.KeyPreview = true;
// Set KeyPreview to true
this.KeyPreview = true;
do you still receive the enter key after the 'duplicate' key? if you have buttons on the form, have you checked where is the focus?
Walter
WalterOP14mo ago
Hmmm, problem resolved itself after I added another button to the kalkylator.... And idk how It's not useful for anything at that moment, have a lot of my pesudocode left in the project that I haven't removed yet
Accord
Accord14mo ago
Was this issue resolved? If so, run /close - otherwise I will mark this as stale and this post will be archived until there is new activity. Was this issue resolved? If so, run /close - otherwise I will mark this as stale and this post will be archived until there is new activity.
Want results from more Discord servers?
Add your server