Solved

Form child to parent

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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

Welcome my friends to the second instalment and follow-up to our Minify and Concatenate Your Scripts and Stylesheets (http://www.experts-exchange.com/Programming/Languages/.NET/ASP.NET/A_4334-Minify-and-Concatenate-Your-Scripts-and-Stylesheets.html)…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
In a recent question (https://www.experts-exchange.com/questions/28997919/Pagination-in-Adobe-Acrobat.html) here at Experts Exchange, a member asked how to add page numbers to a PDF file using Adobe Acrobat XI Pro. This short video Micro Tutorial sh…
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…

803 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