Jul 20, 2002 #1 Jwithrow Programmer Jul 20, 2002 2 US I have an object class that is populated with data on one form, how can I pass this to another form? Thanks in advance.
I have an object class that is populated with data on one form, how can I pass this to another form? Thanks in advance.
Jul 22, 2002 #2 chiph Programmer Jun 9, 1999 9,878 US You do this by making the object public. This can be done by declaring the object as public, or better, using a property to control access to it. Do a search here, and on the VB.NET forum for the words "form" and "public". Chip H. Upvote 0 Downvote
You do this by making the object public. This can be done by declaring the object as public, or better, using a property to control access to it. Do a search here, and on the VB.NET forum for the words "form" and "public". Chip H.
Jul 22, 2002 Thread starter #3 Jwithrow Programmer Jul 20, 2002 2 US Thanks, It was public. The problem I was having was solved by creating an instance of the object on Form1, then in form2 setting Form1.ObjectA = form2.ObjectA But if I didn't initialize the object in Form1 1st, it would throw-up. It was my bad, thanks Upvote 0 Downvote
Thanks, It was public. The problem I was having was solved by creating an instance of the object on Form1, then in form2 setting Form1.ObjectA = form2.ObjectA But if I didn't initialize the object in Form1 1st, it would throw-up. It was my bad, thanks