Hi people.I have a problem and I will try to describe it.I have 5 forms in my Visual Basic application.Fir st one is startup and other 4 forms are connected with first one.Also I have TextBoxes on all forms.I want to connect second form with fifth form, I mean I want to insert data in TextBoxes on second form and want that results of calculation will be showed in TextBoxes on fifth form, but when I close Second Form all data from TextBoxes of second form are erased.How to save them when close Second Form?
Save data in TextBoxes when close Form
Collapse
X
-
I mainly work in WPF so my suggestion would be to use an Object that both pages are bound to.
Because both pages would be using the same object...if my object was a Person, and I changed they eye colour of that person on one page it would appear on the second page as well.
I'm not sure what you are currently doing to display the values on your "5th" page so I can't really help you much further.
-Frinny -
Ok, what have you tried so far to accomplish that?
Did you consider creating an object for this purpose as I suggested previously?
Just to recap:
I suggested creating an object that would be used by both forms.
This object would be responsible for gathering information from the Second-Form and be responsible for "Doing Calculations".
This object would also be used in the Fifth-Form to display the calculations based on what was gathered in the Second-Form.
That way, when you close Second-Form (and all of your TextBoxes are destroyed) you will still have access to the information provided by the user in that form. As an added bonus, the object could actually have functionality that does calculations based on the data within it...that is the beauty of object oriented programming :)Last edited by Frinavale; Dec 9 '13, 08:32 PM.Comment
Comment