easy in VB6 not in .Net
-
hi all i have 2 forms i need to have the contents of form1 transfered to form2. in vb6 it was as simple as loading the form and setting the controls on that form = the controls on the active form. ex. frmContactInfo.txtFName.text = txtFName.text WHy oh why did they remove this simple yet nice way of doing this? any easy way of doing this in VB.Net? my form names are Name = form 1 ContactInfo = form 2 each have 2 text boxes a example would be nice thank you in Advance Help is great only if you ask correctly
-
hi all i have 2 forms i need to have the contents of form1 transfered to form2. in vb6 it was as simple as loading the form and setting the controls on that form = the controls on the active form. ex. frmContactInfo.txtFName.text = txtFName.text WHy oh why did they remove this simple yet nice way of doing this? any easy way of doing this in VB.Net? my form names are Name = form 1 ContactInfo = form 2 each have 2 text boxes a example would be nice thank you in Advance Help is great only if you ask correctly
jlawren7 wrote: WHy oh why did they remove this simple yet nice way of doing this? Because its not proper OOP. How you want to transfer your information is not proper either. All your transferable data should be stored in a shared class object that either Form class uses to retrieve and store the shared data. That way, neither form class has to know anything about the form. Check out Working with Multiple Forms in Visual Basic .NET: Upgrading to .NET[^] on MSDN for examples. RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
-
hi all i have 2 forms i need to have the contents of form1 transfered to form2. in vb6 it was as simple as loading the form and setting the controls on that form = the controls on the active form. ex. frmContactInfo.txtFName.text = txtFName.text WHy oh why did they remove this simple yet nice way of doing this? any easy way of doing this in VB.Net? my form names are Name = form 1 ContactInfo = form 2 each have 2 text boxes a example would be nice thank you in Advance Help is great only if you ask correctly