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:

thank you.
Who is Participating?

Improve company productivity with a Business Account.Sign Up

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)

if the child is already loaded

you could use the mdichildren property

something like

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

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

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

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

addicktzAuthor Commented:
ya, i just got it to work like two seconds ago, it was newdcc.parent instead of .mdiparent thanks =)
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.