passing values from child form to an object in parent form.

  • Thread starter Thread starter frixx net via .NET 247
  • Start date Start date
F

frixx net via .NET 247

I want to know if anybody here knows how to pass values from a child form to an object in parent mdi form.
 
Hi,

Use directcast to get access to the properties of the mdi parent form.
The below example will change the text for an mdi parent form2.

DirectCast(Me.MdiParent, Form2).Text = "Live from mdi child"

Ken
------------------
 
Ken,

* Ken Tucker said:
Use directcast to get access to the properties of the mdi parent form.
The below example will change the text for an mdi parent form2.

DirectCast(Me.MdiParent, Form2).Text = "Live from mdi child"

In addition to your post: You can use an instance variable if you
access more than one member:

\\\
Dim f As Form2 = DirectCast(Me.MdiParent, Form2)
f.Text = ...
f.BackColor = ...
....
///
 
Back
Top