KalluMama
asked on
Two forms and two listboxes
OK I have two forms and each with one list box. When the user click on open on the first form the second form opens up. When the user selects something from the second form's listbox and clicks on ADD that item gets added to the first forms listbox...how do i do this?
formCart.lstProducts.Items .Add(Me.ls tPrintBook s.Selected Item)
I tried this code...but it does not work...
Thanks
formCart.lstProducts.Items
I tried this code...but it does not work...
Thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
I don't have a specific information recomendation, but the essence of the solution is that you needed to refer to an instance of a class, not the class itself. The issue was how to pass an instance of your first form to your second form. Personally, I usually do this by creating a property on the second form to hold the instance of the first form, then when your first form opens your second form, first create a second instance of the second form, set its parent property to the first form ,then show the second form. Now the second form has a reference to the first form.
ASKER
ok i kinda sort got that...but no harm...i will keep "property" in mind and do some more research to get better understanding of this issue...thanks!!
ASKER