MDI Forms :: Working from Parent to Child

Posted on 2004-10-20
Last Modified: 2010-04-24
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.
Question by:addicktz
  • 3
LVL 25

Accepted Solution

RonaldBiemans earned 500 total points
ID: 12359900
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


Author Comment

ID: 12362196
what about from child to child ?

Author Comment

ID: 12362302
       Dim mdiParen As mdiParents = CType(Me.MdiParent, mdiParents)

why does this not work ?
LVL 85

Expert Comment

by:Mike Tomlinson
ID: 12362561
In what context is your last post used?  What is ondata() and dt?


Author Comment

ID: 12362938
ya, i just got it to work like two seconds ago, it was newdcc.parent instead of .mdiparent thanks =)

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This tutorial demonstrates one way to create an application that runs without any Forms but still has a GUI presence via an Icon in the System Tray. The magic lies in Inheriting from the ApplicationContext Class and passing that to Application.Ru…
Article by: Kraeven
Introduction Remote Share is a simple remote sharing tool, enabling you to see, add and remove remote or local shares. The application is written in VB.NET targeting the .NET framework 2.0. The source code and the compiled programs have been in…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…
Concerto provides fully managed cloud services and the expertise to provide an easy and reliable route to the cloud. Our best-in-class solutions help you address the toughest IT challenges, find new efficiencies and deliver the best application expe…

929 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now