Karthik Agarwal

Karthik Agarwal

  • NA
  • 748
  • 266.1k

How to pass a string from one FORM to another?

Dec 23 2011 1:53 AM
Hi,

I have a two FORM's suppose FORM1 and FORM2. I have a textbox and a button in FORM1 when that button is clicked it shows up FORM2 which i have already done. In FORM2 there are strings in a grid which can be selected by the user then all the strings which the user has selected in FORM2 gridview should be shown up in FORM1 textbox.

Here's is where the problem occurs when i want to show up FORM2 from FORM1 i have included FORM2.h in FORM1. Now when i want to send the strings from FORM2 to FORM1 i should be including FORM1.h in FORM2 right which cant be done i hope. Now how to access the FORM1 textbox text property and put the text over there.


Answers (29)