0
Answer

Input from On-Screen Keypad

Ask a question
I have a program that uses an on-screen keypad to enter currency amounts. The display is in a TextBox and the output is a Decimal (after conversion). The problems I am having are these:

1)  I cannot get the textbox to clear its display after I exit the keypad screen to move on to another part of the program. When I return to the screen it will continue to display the previous value. I have tried declaring the value as String.Empty and using the Clear method in various procedures to attempt to get the display to clear but I am missing something. Even when I manually clear the textbox the previous value returns as soon as I enter anything from the keypad.

2)  I cannot seem to find a way to force the output to be a 2-place decimal. All the examples I have found pertain to using the keyboard for input. This is secondary to the primary problem.