Solved

Form child to parent

Posted on 2007-03-17
3
281 Views
Last Modified: 2013-11-26
Hi. I have parent form which has lots of differnt child forms. I need to change mdiparents one of the controls property from the child form.
For example, mdiparent has a statusbar, and I need to change the statusbars visible property from false to true, from one of the child form or form module. How can I do that?
Thanks..
0
Comment
Question by:gokhanoz
  • 2
3 Comments
 
LVL 62

Accepted Solution

by:
Fernando Soto earned 500 total points
ID: 18741384
Hi gokhanoz;

Here you go.

Public Class Parent
    Inherits System.Windows.Forms.Form
    Private Sub MenuItem1_Click(ByVal sender As System.Object, _
        ByVal e As System.EventArgs) Handles MenuItem1.Click

        Dim child As New Child
        child.MdiParent = Me
        child.TopLevel = False
        child.Show()

    End Sub
End Class

Public Class Child
    Inherits System.Windows.Forms.Form

    Private Sub Button1_Click(ByVal sender As System.Object, _
        ByVal e As System.EventArgs) Handles Button1.Click

        Dim parent As Parent = Me.MdiParent()
        parent.StatusBar1.Text = "This child just updated parent status bar text property"

    End Sub
End Class

Fernando
0
 

Author Comment

by:gokhanoz
ID: 18741421
Thanks..
0
 
LVL 62

Expert Comment

by:Fernando Soto
ID: 18742339
Not a problem, glad to help. ;=)
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Flash (http://en.wikipedia.org/wiki/Adobe_Flash) has evolved over the years to where it has become a masterful tool for displaying content screen.  It has excellent layout placement, UI precision as well as rendering capabilities. This, along with t…
Recently while returning home from work my wife (another .NET developer) was murmuring something. On further poking she said that she has been assigned a task where she has to serialize and deserialize objects and she is afraid of serialization. Wha…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.

920 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now