0

Hello, I am wondering how you read input from a text box in microsoft visual studio Forms.

I'm trying to make a program that reads text box data and tells you the readout, but I don't know what to type to return the data typed in a text box.

Please help.

2
Contributors
4
Replies
5
Views
7 Years
Discussion Span
Last Post by TailsTheFox
0

If your textbox is named textBox1, the textBox1->Text member contains the text that was typed in. Place a button on your form and double click it, and type your code in the button handler to display it in a message box or whatnot.

0

In the designer, drag a button onto your form. Double click it, which will put an event handler in your code automatically. If there isn't a textbox already, then add one and make a note of it's name by looking in the properties window on the right side.
(let's assume the textbox's name is textBox1.


To start off, in that event handler that the ide generated type something like MessageBox::Show(textBox1->Text);

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.