Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

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...

P.L.U.R - Peace, Love, Unity, Respect :P
  • *Experts*
Posted
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.
Posted

*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.

P.L.U.R - Peace, Love, Unity, Respect :P
  • *Experts*
Posted

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.

:)

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...