c# how to get keydown and button click to do the same thing??

Posted by myax on Stack Overflow See other posts from Stack Overflow or by myax
Published on 2010-06-07T06:19:15Z Indexed on 2010/06/07 6:22 UTC
Read the original article Hit count: 175

Filed under:
|

I am new to C#.I am learning to make a calculator just like ms windows calculator.the buttons work when i click it, but I want the numpad to work too. Suppose the user types '0', it should be the same as if he clicked the 0 button on my gui. here is my button click event for 0.

private void button0_Click(object sender, EventArgs e)
        {
            checkifequa();
            textBox1.Text = textBox1.Text + "0";
        }

how do i get the keydown to work?

© Stack Overflow or respective owner

Related posts about c#

Related posts about calculator