MDI Children passing variables to and fro

meanelvis

Newcomer
Joined
Apr 16, 2003
Messages
2
Location
Chicagoland, IL
I'm using VB.net

Let me know if I'm way off-track here.

What i've got is an MDI container that's 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 child1's "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.

Here's what I'm planning on doing with the app:

child1's 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? i'll be working on that unless someone thinks i'm way off base here.

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