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 8580695
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T20:52:57+00:00 2026-06-11T20:52:57+00:00

I have 5 forms as following: Form1 Form2 Form3 Form4 Form5 Form1 is my

  • 0

I have 5 forms as following:

  • Form1
  • Form2
  • Form3
  • Form4
  • Form5

Form1 is my startup form.i have 4 button in this form to show other forms(form2,form3,form4,form5).I want show other forms behind of the form1, then when i minimize form1 ,other forms minimized too and when i restore form1 other forms restored too.However form1 always is top of other forms.

How can i implement this?

  • 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-06-11T20:52:58+00:00Added an answer on June 11, 2026 at 8:52 pm

    Try this in your top form.

    private List<Form> subForms;
    private bool minimized = false;
    
    public TopForm()
    {
        InitializeComponent();
        subForms = new List<Form>();
        subForms.Add(new SubForm(1));
        subForms.Add(new SubForm(2));
        subForms.Add(new SubForm(3));
        subForms.Add(new SubForm(4));
        subForms.Add(new SubForm(5));
    
        foreach (Form f in subForms)
        {
            f.Show();
        }
    
        BringToFront();
        Resize += OnResize;
    }
    
    /// <summary>
    /// Detects a resize event and handles it according to window state.
    /// </summary>
    /// <param name="sender">Top form</param>
    /// <param name="args">Unused</param>
    private void OnResize(object sender, EventArgs args)
    {
        switch (WindowState)
        {
        case FormWindowState.Normal:
            if (minimized)
            {
                minimized = false;
                OnRestore();
            }
            break;
        case FormWindowState.Minimized:
            minimized = true;
            OnMinimize();
            break;
        }
    }
    
    /// <summary>
    /// Minimize all sub forms
    /// </summary>
    public void OnMinimize()
    {
        foreach (Form form in subForms)
        {
            form.WindowState = FormWindowState.Minimized;
        }
    }
    
    /// <summary>
    /// Restore all forms and bring them to the front, with this main form on top.
    /// </summary>
    public void OnRestore()
    {
        foreach (Form form in subForms)
        {
            form.WindowState = FormWindowState.Normal;
            form.BringToFront();
        }
        BringToFront();
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to do the following (c#) I have a Form,let's call Form1 Form1
I have the following form code: # forms.py class SomeForm(forms.Form): hello = forms.CharField(max_length=40) world
I have the following form for photo_album which uses the nested forms feature of
I have 2 forms set up. In the first form I have the following
This should be a pretty straightforward question. I have the following code, which forms
I have the following to capture the checkbox check event of form with id=form1:
I have a simple XML document <abc:MyForm xmlns:abc='http://myform.com'> <abc:Forms> <def:Form1 xmlns:def='http://decform.com'> .... </def:Form1> <ghi:Form2
I have a project that contains two forms, Form1.h and Form2.h. The .cpp files
I have a simple model forms, that is being rendered through the following jinja2
I have the following line of code for a Windows forms application: return Encoding.ASCII.GetBytes(chars.ToArray());

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.