data through multi forms
-
hi all I am making a second form to help the user enter info that will go into a sql query I have seen many examples to pass info TO a new form but i haven't really seen anything about how to pass the info back. I am currently using a public string hold the info in form1 but it seems to me that there must be a better way to pass the info back something more like a return or something like that My other question is that is there anyway i can triger an event when form2 closes?
-
hi all I am making a second form to help the user enter info that will go into a sql query I have seen many examples to pass info TO a new form but i haven't really seen anything about how to pass the info back. I am currently using a public string hold the info in form1 but it seems to me that there must be a better way to pass the info back something more like a return or something like that My other question is that is there anyway i can triger an event when form2 closes?
A delegate is the best way to pass data back. It's also an event, so it's the way to tell form1 that form2 has closed, assuming it's modeless.
Christian Graus - Microsoft MVP - C++ "I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
-
A delegate is the best way to pass data back. It's also an event, so it's the way to tell form1 that form2 has closed, assuming it's modeless.
Christian Graus - Microsoft MVP - C++ "I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )