Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6246729
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T12:44:41+00:00 2026-05-24T12:44:41+00:00

i Hallo, m using MDIContainer. 1. How can i pass the varaible from parent

  • 0

i
Hallo,
m using MDIContainer.
1. How can i pass the varaible from parent to child ?
2.How can i prohibited to open more than 1 window with the same Name (That means in my MenuStrip there are Ordre,Tarif,Config… when user already open the Ordre, when he click the menustrip ordre again, it not open a new window/created a new child but pointed to the ordre window that already open) ?

Thanx before.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T12:44:42+00:00Added an answer on May 24, 2026 at 12:44 pm

    Create a private, protected or public member in your mdicontainer window:

    class MyMdiContainer : Form
    {
        private object m_var;
    
        // Property approach
        public object MyVar
        {
            get { return m_var; }
            set { m_var = value; }
        }
    }
    

    And here is the mdi child:

    class MyMdiChild : Form
    {
        private object m_childVar;
    
        void Communicate()
        {
            // Read variable
            this.m_childVar = ((MyMdiContainer) this.MDIParent).MyVar;
    
            ((MyMdiContainer) this.MDIParent).MyVar = "Child Foo";
        }
    }
    

    In the example above we use two fields, each one for the two classes, property for storing the var in the MDI parent, and method in child for making a communication on the variable and storing a copy inside the child.

    This is useful for parent to child, but it should be implemented in different way for parent to many children with synchronization.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hallo, I using the following code from css play. this display a menu. .preload16
hello i am using this Page.ClientScript.RegisterStartupScript() to call a javascript function from vb code
Hallo, I cannot compile my project using an ant build script. The error message:
Hallo, I'm using CMake as build system in one of my projects which is
Hallo I'm new to Rails and have one simple question. I'm using radiant as
Hallo, I want to copy my Active Directory Users, Groups and Group Memberships from
Hallo all. I have a java project using SVN as scm. I have the
I want to print a list of strings like [hallo, world, !] using putStrLn
Hallo, i am using WSS 3.0 and i need to display certain entries of
I'm learning Squeryl and trying to understand the 'using' syntax but can't find documentation

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.