Forms and passing variables between them


2007-11-18 11:21:27 PM
cppbuilder97
Hi all!
Here is my problem:
On my first form Form1 there are lets say 3 Edit components and I want
to fill their edit text with a date. I double click on the edit
component and call my second form Form2 that has a date picker.
void __fastcall TForm1::Edit1DblClick(TObject *Sender)
{
Form2->ShowModal();
}
After choosing the date on MonthCalendar1 and clicking on a button
'Pick it!' the chosen date should be written to the Edit box that
fired the Form2->ShowModal().
My question is how to know the exact element that opened Form2 and how
to get the right reference to Edit?->Text to write to? The point is I
want to call one form X, choose some data and transfer the data to the
element (it's on some other form) that called form X.
Thaks a million !