Solved

Form child to parent

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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

This document covers how to connect to SQL Server and browse its contents.  It is meant for those new to Visual Studio and/or working with Microsoft SQL Server.  It is not a guide to building SQL Server database connections in your code.  This is mo…
Many of us here at EE write code. Many of us write exceptional code; just as many of us write exception-prone code. As we all should know, exceptions are a mechanism for handling errors which are typically out of our control. From database errors, t…
This video discusses moving either the default database or any database to a new volume.
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

706 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

19 Experts available now in Live!

Get 1:1 Help Now