The title is a little vague. I have a form with several textboxes that require user input. The input is all numerical. This is a touchscreen application, so when the textbox gets focus, a “numberpad” form is displayed for the user to input the number. The user’s input is displayed on the “numberpad” form.
The question: How do I get that input to be set as the text property of the calling textbox?
I know I could pass some int value then use a big switch statement when the value is to be passed, but there are around 30 textboxes. Any ideas?
In your NumberPad form, have a property that is your result:
When the user hits the button to save the data, assign the value and set the DialogResult for the form:
In the calling form, check the result and only process if it is OK (in other words, the NumberPad was saved and not cancelled):