text box

closed account (4w7X92yv)
Hello

I have a text box on my form1 and in my form1.h:

1
2
3
private: System::Void txtLoops_TextChanged(System::Object^  sender, System::EventArgs^  e) {

	}


What it has to do:

When you enter a number in the text box it should be saved in the variable "amountofloops"

How to do that?

Best Regards
Joriek
Just assign the the value of the Text property to the variable. If the types don't match, use one of the methods in the Convert class. Don't ask me about specific syntax, though, as I don't know C++/CLI.

If the above is not enough, ask your question in the MSDN Forums. Here we only know about unmanaged C++.
Int32 amountofloops = Int32::Parse(textBox1->Text);
closed account (4w7X92yv)
thanks bob
Topic archived. No new replies allowed.