Solved

MDI Forms :: Working from Parent to Child

Posted on 2004-10-20
5
821 Views
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:
http://www.experts-exchange.com/Programming/Programming_Languages/Dot_Net/VB_DOT_NET/Q_21174265.html

thank you.
0
Comment
Question by:addicktz
[X]
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
5 Comments
 
LVL 25

Accepted Solution

by:
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)
 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
 
LVL 1

Author Comment

by:addicktz
ID: 12362196
what about from child to child ?
0
 
LVL 1

Author Comment

by:addicktz
ID: 12362302
       Dim mdiParen As mdiParents = CType(Me.MdiParent, mdiParents)
        mdiParen.ondata(dt)

why does this not work ?
0
 
LVL 86

Expert Comment

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

~IM
0
 
LVL 1

Author Comment

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

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
ASP.NET/VB: Convert Date and Time to YYYY-MM-DDTHH:MM:SS 3 46
VB.net VSTO Excel Ribbon error 4 25
vb.net datagrid point 4 31
vb.net dbnull syntax 1 48
Since .Net 2.0, Visual Basic has made it easy to create a splash screen and set it via the "Splash Screen" drop down in the Project Properties.  A splash screen set in this manner is automatically created, displayed and closed by the framework itsel…
The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (http://www.ecb.europa.eu/stats/exch…
This video shows how to use Hyena, from SystemTools Software, to update 100 user accounts from an external text file. View in 1080p for best video quality.

738 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