That was just an example function I created. I expected that you would take the code you needed from it and put it in your own function.
I don't think that TTextBox::Text takes a std::string, does it? You might have to say textBox1->Text = found.c_str();
Hope this helps.