0

I have designed a calculator using visual studio 2013 ultimate.The calculator needs take input only through calculator interface keypad.(user won't be able to enter via keyboard). In my design if i click the cursor on the space which has given to display values,the cursor can see on display area.

How can i unable the use of keyboard and enter inputs via interface keyboard.

leppie
  • 115,091
  • 17
  • 196
  • 297
ict
  • 95
  • 1
  • 5
  • And you have done this using C#, VB.Net, C++, JavaScript, Python, HTML, Silverlight or any other language/framework/whatever VS supports? You really should provide much more, and detailed, information. As the question is written it's really impossible to answer. – jpw Aug 22 '14 at 08:54
  • well,I have done this using C#.It's like this.In my calculator there is a display area(to display entered values and answers.)and a keyboard area.(the interface is exactly same as Microsoft calculator). If I press '1' BUTTON ,value '1' should be taken likewise.In my case ,if I place the cursor and click on the display area the cursor enables to enter values via keyboard.All I want is enter values ONLY through calculator interface buttons. – ict Aug 22 '14 at 09:16
  • I would suggest that you detect if _any_ keyboard key is pressed and just simply don't do anything with the input (just have your event handler call `return` or something to that effect). To detect any key press look here: http://stackoverflow.com/questions/12076107/how-to-detect-if-any-key-is-pressed – Carl Burnett Aug 22 '14 at 09:23

1 Answers1

0

on the space which has given to display values

You have to make this space a textblock,so it cannot be pressed.You can receive input from the buttons(?) that represent digits (1,2,3,4,etc) ,store the result in a variable and display it in the textblock. With the textbox element you can handle users input. If you don't want a keyboard input, don't use a texbox.

GeralexGR
  • 2,973
  • 6
  • 24
  • 33