Click to See Complete Forum and Search --> : Passing Data Between Forms


btscl
July 22nd, 2005, 04:45 AM
I've created a new windows form application in VC++ .Net 2003 with multiple forms. Is there a simple way to pass data between the forms?

Any help would be greatly appreciated.

Regards

Carl

talalhallaj
April 6th, 2008, 09:01 AM
Hi Carl ,
we are now in the year 2008 ,
I'm working in C++/CLI 2005 anr I need as you need , to solution for same problem , have you any answer about it .
thank you too much .
Talal

robbcorp
April 15th, 2008, 05:23 PM
What I have done in the past is if I have form that is data dependent and is spawned from a parent form, I simply pass the data in via the constructor of the child form.

That works pretty well in that scenario.

I have also utilized a singleton class that has a large scope. So if I have a form that writes data to the singleton class, I can use that same instance of the singleton elsewhere, even on a different form.