send data to parrent form

  • Thread starter Thread starter Maarten
  • Start date Start date
M

Maarten

i have a parrent form, form1
and i child form, form2

when i press a button in form2, tha data of the text1 of form2 must be
places in text1 of form1

something like

form1.text1 = form2.text1 (won't work)
this is an example, i'm planning to do this with the data of listboxes.

i have a book, but they only give an example, when the press button is on
form1

thanks maarten
 
Maarten,

A MDIparent has normally beside a menu, a Toolbar and a text fields nothing
on it.
Where do you want to place that text in your parent do you want it to place
in the children?

And than you can reach them all with that MDIchildren collection what I
showed you already.


Cor
 
i have a toolbar on my parrent form, with 2 chechedlistboxes (small ones)

whan y check on an other chechedlisbox (from a child form) the same
checkboxes must be cheched on that parrent form.

and my statusbar must contain the text of the child form.
 
Maarten,

I made a sample for you. To make it as simple as possible did I use the text
from the forms, that is what you maybe call the form tittle left above.

\\\A mdi form
Private Sub Form1_Load(ByVal sender As Object, _
ByVal e As System.EventArgs) Handles MyBase.Load
Dim frm2 As New Form2
Dim frm3 As New Form3
frm2.MdiParent = Me
frm3.MdiParent = Me
frm3.Show()
frm2.Show()
For Each frm As Form In Me.MdiChildren
frm.Text = Now.ToString
Next
End Sub
///
\\\a form with one button
Private Sub Button1_Click(ByVal sender _
As System.Object, ByVal e As System.EventArgs) _
Handles Button1.Click
For Each frm As Form In Me.ParentForm.MdiChildren
frm.Text = Now.ToString
Next
Me.ParentForm.Text = Now.ToString
End Sub
///

I hope this helps?

Cor
 
Back
Top