The two above answers are both correct. However, I would like to point you on a little detail that I have often overlooked myself. When you want your
Form
to raise the
KeyDown
,
KeyUp
,
KeyPress Events
you should make sure the
KeyPreview Property[
^] of your Form is set to
true
. Your
Form
will then get ALL key presses you make (also key presses you make in
Controls
on your
Form
).
Another read you might be interested in is
How Programming Should Be Done[
^] by Marc Clifton. Compare it to your own calculator and see where your two are different. Could be a great way to see how things could be done differently :)