MDI Children passing variables to and fro

meanelvis

New member
Joined
Apr 16, 2003
Messages
2
Location
Chicagoland, IL
Im using VB.net

Let me know if Im way off-track here.

What ive got is an MDI container thats loading 2 MDI children: Child1 and Child2. In a nutshell, what I want to happen is whenever a listbox control in child1 is changed, I would like it to pass the listbox value to child2, have child2 set that variable as a parameter for a stored procedure in a data adapter, and have that dataset fill. All triggered by the child1s "ListBox1_SelectedIndexChanged" event.

This works fine when all the controls are on a single form, but it would be optimal for my app if I could have them on separate forms.

I guess my very basic question is, what is the best way to go about getting MDI child forms to interact with one another? Could you provide me with a simple example?

Much appreciated in advance for any help on this.
 
i was about ready to give up and hang my head in shame on reading your one-line answer because i had delusions of getting a step by step tutorial on how to do this, but after researching a bit i want to thank you for kickin me in the right direction.

Heres what Im planning on doing with the app:

child1s selectbox handles a onchange event that calls a sub in the parent (MdiParent),passing to it the value selected.

parent takes that, activates child2 (using activateMdiChild) and calls a sub within child2 that handles the parameter and refreshes the datagrid.

that sound about right? ill be working on that unless someone thinks im way off base here.

Thanks for the push in the right direction.
 
Last edited by a moderator:
Back
Top