I have a form with a readonly textbox, some layoutpanels with some buttons in it and together they make up a calculator. (Yes I know this is YAC (yet another...)) but I have fun while still learning!
When I click the buttons and manipulate the Text property of the textbox, al is well.
Now I like to use keyboard input also, but I don't seem to get a grab at the KeyDown event. My textbox obviously does not have Focus, but which control has?
What am I doing wrong or how should I proceed?
ddanbe
2,724
Professional Procrastinator
Featured Poster
Recommended Answers
Jump to PostAre you using the form's KeyDown or the control's KeyDown event?
Since this is a calculator i'm guessing you want to catch when a user presses "*" regardless of what control has focus to handle the event. In this case you should handle the form's KeyDown event.
Also …
All 4 Replies
sknake
1,622
Senior Poster
Featured Poster
ddanbe
commented:
Has great knowledge!
+4
ddanbe
2,724
Professional Procrastinator
Featured Poster
sknake
1,622
Senior Poster
Featured Poster
ddanbe
2,724
Professional Procrastinator
Featured Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.