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

  • Home
  • SEARCH
  • 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 7507319
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T22:27:55+00:00 2026-05-29T22:27:55+00:00

i have an MDIParent and a Menustrip so when i click on a StripMenuitem

  • 0

i have an MDIParent and a Menustrip so when i click on a StripMenuitem shows me another form inside my MdiParent Form,
so my problem is : the Form_Load Event for the form which is opened inside the MdiParent wont work !,it seems like i have to use another event :/

Any idea?
Thank you

here is the code how i show my form inside the MdiParent form

FormVehicule FV;
private void véhiculeToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (FV == null)
            {
                FV = new FormVehicule();
                FV.MdiParent = this;
                FV.WindowState = FormWindowState.Maximized;
                FV.Show();
            }
            else
            {
                FV.WindowState = FormWindowState.Maximized;
                FV.Show();
                FV.BringToFront();
            }
        }

So in the code of the child Form FormVehicule

private void FormVehicule_Load(object sender, EventArgs e)
        {
            comboBoxUnite.SelectedIndex = 0;
            U = new Unite(FormLogin.Con);
            U.Lister();
            for (int i = 0; i < U.C.Dt.Rows.Count; i++)
                comboBoxUnite.Items.Add(U.C.Dt.Rows[i][0].ToString());
            comboBoxConducteur.SelectedIndex = 0;
            C = new Conducteur(FormLogin.Con);
            C.Lister();
            for (int i = 0; i < C.C.Dt.Rows.Count; i++)
                comboBoxConducteur.Items.Add(C.C.Dt.Rows[i][0].ToString());
            V = new Vehicule(FormLogin.Con);
            V.Lister();
            dataGridViewVehicule.DataSource = V.C.Dt;
            MessageBox.Show("Test");
        }
  • 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-29T22:27:56+00:00Added an answer on May 29, 2026 at 10:27 pm

    How do you handle the Form.Load event?

    The same code works to me:

    void toolStripMenuItem1_Click(object sender, EventArgs e) {
        Form childForm = new Form();
        childForm.MdiParent = this;
        childForm.Load += childForm_Load; // subscribe the Form.Load event before Form.Show()
        childForm.Show(); // event will be raised from here
    }
    void childForm_Load(object sender, EventArgs e) {
        // ...
    }
    

    You can also use the following approach:

    void toolStripMenuItem1_Click(object sender, EventArgs e) {
        MyChildForm form = new MyChildForm();
        form.MdiParent = this;
        form.Show();
    }
    class MyChildForm : Form {
        protected override void OnLoad(EventArgs e) {
            base.OnLoad(e);
            //...
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have main form which is MDI parent. Inside I opened second (same solution,
I have an MDI Parent, containing a MenuStrip. When I click on one of
I have an MDI WinForms app in which the MDI parent form has a
I have a MDIparent Forma and which has some mdichild forms in it. Can
I have a control in my parent mdi form which I wish to be
Any guidance on the following issue would be greatly appreciated. In which MDIParent event
In my application, I have a mainform which is the MdiParent of all other
I have a form with a button in it. If i click the button
Please guide and help me. I have a MDI parent form which has a
I have a form which is an MDI container. In that form i generate

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.