absent Posted December 25, 2003 Posted December 25, 2003 Another one sorry... seems I am finding all my problems on Xmas day... Loverly present from Microsoft for me... lol... I'm trying to refrence and control on a multi form application. On the setup form I am trying to send values back to the parent form. using old vb6 commands : form1.listbox1.items.add(form2.listbox1.selectedItems) But I keep getting an error that it requires a refrence to a non shared member... any ideas on how to do it? Thanx a million in advance... Quote P.L.U.R - Peace, Love, Unity, Respect :P
*Experts* mutant Posted December 26, 2003 *Experts* Posted December 26, 2003 You need the instance of the parent form. You can't just access a form instance using its class name. What you could do is pass the instance of your parent form to your settings form using constructors. Or if you are using the settings form modally, use constructor wihich accepts a form instance as a paramenter, and then from your setting form use the Owner property to access the parent form. Quote
absent Posted December 26, 2003 Author Posted December 26, 2003 *blank look* Right.... ummmmmmm not to sound dumb(Althought you never know I might be lol) - But how would I do any of that? VB.net is new to me still and I'm having a SERIOUS learning curve to do it. Quote P.L.U.R - Peace, Love, Unity, Respect :P
*Experts* mutant Posted December 26, 2003 *Experts* Posted December 26, 2003 Well, first you have to make a choice. Pass form instances through constructors, setting up a property maybe,or show your setting form modally, which means that your main application won't respond until the form shown modally is dealt with. :) Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.