I have Form1 and Form2 in my project. On Form1 I open Form2 like this:
Form2^form2 = gcnew Form2;
form2->Show();
In the Form2:s LoadEvent I use this code so this Form2 will be Active/Shown even that I click on Form1:
private: System::Void Form2_Load(System::Object^ sender, System::EventArgs^ e)
{
Form2::TopMost::set(true);
}
Now is my question this. If I have a textBox1 on Form2 with a written text inside. How can it be possible to reach this text from a button on Form1.
Usually you could have written like this if the textBox was on Form1 in this case:
String^ GetText = textBox1->Text;