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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T01:54:48+00:00 2026-05-28T01:54:48+00:00

I have a WinForms application which has two panels which individually contain a usercontrol

  • 0

I have a WinForms application which has two panels which individually contain a usercontrol component (one in each panel). How ever, because both panels are the same size and in the same location, the top most panel becomes a child of the other panel. I want to be able to hide one panel and then show the other panel:

this.panel1.visibile = false;
this.panel2.visibile = true;

But when I hide panel1, the second panel is hidden as well.

How can I make panel2 a non-child of panel1?

I like to keep things simple because I’m new to C# Programming.

  • 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-28T01:54:49+00:00Added an answer on May 28, 2026 at 1:54 am

    This is a common accident in the designer. Dropping the second panel on top of the first one will make it a child of the first panel. Two basic strategies to fix this:

    • View + Other Windows + Document Outline. Click the second panel in the list and drag it to the form. You’ll need to fix up the Location property by hand by typing its value in the Property window.

    • Keep the upper left corner of the second panel just a bit to the left or top of the first panel. Put it in the right place in the form’s constructor by assigning its Location property after the InitializeComponent() call.

    Check this answer for a control that works well at design time and lets you easily flip panels at runtime.

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

Sidebar

Related Questions

I have a WinForms gui application which has a number of areas to it
I have a WinForms Application which for instance has 2 different Types of objects
I have a C# .net winforms application with two forms which connects to sql
i've made a C# winforms application. Now i have a form which has lots
We've developed a desktop application using .NetFX3.5 which has some winforms and two WPF
I have a C#/.NET Winforms application which has some settings stored using A '.settings'
The following problem has me stumped: I have a WinForms application which used to
We have a WinForms application which runs on a touch-screen on a bit of
I have a winforms application in which I am using 2 Forms to display
We have a WinForms application written in C# that uses the AxAcroPDFLib.AxAcroPDF component to

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.