You need to have a variable in your class, maybe called count, initialized to 0 in the constructor.
When the timer fires you increment it and set the textbox to the new value.
but ill try hammerman's idea
It has nothing to do with the problem of incrementing the number, but also you can't assign a widestring to a System::String.
In C++ / CLR it's best to have an amnesia and forget std::string. System::String has everything you need and more.
i ran a check to see if textBox3->Text has "test" in it when textBox1->Text equals textBox2->Text
it didn't have test and count++ just kept going.
this is basically what the code is doing
if random number = count
timer2->Enabled = false
(let's say the random number is 5)
count: 1 2 3 4 5 6
count keeps going and the textbox ignores the 5 so the timer isn't being disabled. any solution for this?