MDI Forms :: Working from Parent to Child

Some in detail explained three ways to work from child to parent, I was wondering if someone could explain to me in similar detail how to work from parent to child?

this is what was given to me for child to parent:
http://www.experts-exchange.com/Programming/Programming_Languages/Dot_Net/VB_DOT_NET/Q_21174265.html

thank you.
LVL 1
addicktzAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
RonaldBiemansConnect With a Mentor Commented:
Well the first method would be when you instanciate the child

dim fchild as new child1
fchild.label1.text = "hello"
fchild.datagrid1.datasource = ds.tables(0)
 etc..
fchild.show


if the child is already loaded

you could use the mdichildren property

something like

for each x as form in me.mdichildren
   if x.name = "yourchildformname"
       ctype(x,yourchildformname).label1.text = "hallo"
       ctype(x,yourchildformname).datagrid1.datasource = ds.tables(0)
   endif
next

or you could define the child form global in the form then you could use in anywhere in your parent form

0
 
addicktzAuthor Commented:
what about from child to child ?
0
 
addicktzAuthor Commented:
       Dim mdiParen As mdiParents = CType(Me.MdiParent, mdiParents)
        mdiParen.ondata(dt)

why does this not work ?
0
 
Mike TomlinsonMiddle School Assistant TeacherCommented:
In what context is your last post used?  What is ondata() and dt?

~IM
0
 
addicktzAuthor Commented:
ya, i just got it to work like two seconds ago, it was newdcc.parent instead of .mdiparent thanks =)
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.