I have two Windows forms. Form1 has a button which, when clicked on, opens up Form2 (which looks like a drop down/combobox type of control). Form2 is a grid of buttons that look like a telephone keypad. When one of these buttons is clicked on, Form2 closes and the text that was on the button clicked should be set to the text of the button in Form1. Anyone have any idea how I can do this? I've tried some code samples that sends text from a textbox from one form to another, but nothings working for the buttons I'm using. Form2 closes as it should when one of it's buttons is clicked... I just can't figure out how to send that buttons text to Form1's button's text.
Re: problem transfering data from one form to another
Look, As far I got your scenario, Form2 may have property Number which holds the numbers user enters.
Before closing the Form2 From Form1, read the Form2.Number.
Re: problem transfering data from one form to another
Here's a screen capture of what I've got to give a better idea of what it is I'm trying to do. No textboxes are involved at all. Only buttons and the text on those buttons. The "telephone keypad" is my Form2, which "pops up" (or, "drops down", as it appears to do in my app) when the "?" button on my Form1 is clicked on. Form2 has no titlebar or border to give it the appearance of a "drop down" control. When one of the number buttons on Form2 is clicked on, the keypad (Form2) closes, but whatever key is clicked on, that number, "*" or "#" should replace the "?" text in the button on Form1.
Either the thread starter or a moderator has marked this thread as solved. You can most likely trust the responses and answers given. There is most likely no reason for any further responses to be posted here. If you have a related question, please start a new thread in this forum instead.
This thread is more than three months old
No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.