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
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 86

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

Creating Instructional Tutorials  

For Any Use & On Any Platform

Contextual Guidance at the moment of need helps your employees/users adopt software o& achieve even the most complex tasks instantly. Boost knowledge retention, software adoption & employee engagement with easy solution.

Question has a verified solution.

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

I think the Typed DataTable and Typed DataSet are very good options when working with data, but I don't like auto-generated code. First, I create an Abstract Class for my DataTables Common Code.  This class Inherits from DataTable. Also, it can …
Introduction As chip makers focus on adding processor cores over increasing clock speed, developers need to utilize the features of modern CPUs.  One of the ways we can do this is by implementing parallel algorithms in our software.   One recent…
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …

724 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