Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sharing data between forms..? 1

Status
Not open for further replies.

clifff

Programmer
Mar 22, 2002
20
MD
Hi! Can someone tell me how to change data between 2 dialogs that calls each other. I need data from 1 to pass to 2-nd. Do i need to use Clipboard?
 
If the data is a member variable or object of the one form, you merely need to acces the forms attributes from the other form.Be sure to include the forms header files on each form

For example, assuming Form1 has and edit box on it called Edit1 and you want to set the Text in an edit box (called Edit2) on your second form to match it on say a button click

Edit2->Text = Form1->Edit1-Text;

or say you have a member variable: String Test;

Edit2->Text = Form1->Test;
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top