F frixx net via .NET 247 Jun 26, 2004 #1 I want to know if anybody here knows how to pass values from a child form to an object in parent mdi form.
I want to know if anybody here knows how to pass values from a child form to an object in parent mdi form.
K Ken Tucker [MVP] Jun 26, 2004 #2 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 ------------------
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 ------------------
H Herfried K. Wagner [MVP] Jun 26, 2004 #3 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" Click to expand... 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 = ... .... ///
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" Click to expand... 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 = ... .... ///