naouf gyd

naouf gyd

  • NA
  • 15
  • 10.3k

How to design a keypad in C#?

Nov 12 2015 3:36 PM

I am new to C# and I am planing to design my own keypad but I don't know how/where to start, I have 4 textBoxes the keypad buttons.

The first problem came into my mind was: how can I detect the cursor location (which textBox is the cursor in?).

So for example if I had only one textbox then it is easy I could write inside button1 : textBox1.text = "1" and inside button2 : textBox1.text = "2" and inside button_A : textBox1.text = "A".... and so on but I have 4 textBoxes and it is confusing.

Can you please provide me with an idea or what to write inside each button to print its value in the textbox which the cursor is in.

Thank you professionals.


Answers (1)