Solved

Form child to parent

Posted on 2007-03-17
3
283 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 63

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 63

Expert Comment

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

Featured Post

How our DevOps Teams Maximize Uptime

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us. Read the use case whitepaper.

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…
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

860 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