Hi @Anonymous ,
You need to complete the preparations in this link before implementing this function.
Now, you need to right click on the textBox
and select properties, then double click on TextChanged
in the event list, this event is triggered when the text property finds a change.
Then enter the following code to achieve your needs.
private:
System::Void textBox1_TextChanged(System::Object ^ sender,
System::EventArgs ^ e) {
MyForm ^ form1 = (MyForm ^) Application::OpenForms["MyForm"];
form1->txt1->Text = textBox1->Text;
}
private:
System::Void textBox2_TextChanged(System::Object ^ sender,
System::EventArgs ^ e) {
MyForm ^ form1 = (MyForm ^) Application::OpenForms["MyForm"];
form1->txt2->Text = textBox2->Text;
}
RESULT:
Best regards,
Elya
If the answer is the right solution, please click "Accept Answer" and upvote it.If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.