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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T06:39:28+00:00 2026-06-10T06:39:28+00:00

I Googled around but seems my problem happens when two gropboxes are overlapping, in

  • 0

I Googled around but seems my problem happens when two gropboxes are overlapping, in my case they are not overlapping!
Problem is that the Visible property of groupbox doesn’t work. what am I trying to do is that groupbox1 is visible when program starts and groupbox2 is not, by clicking on a button it should goes invisible and groupbox2 should appear, clicking the same button this action should be done vice versa.

here is my code:

    private void button2_Click(object sender, EventArgs e)
    {
        if (groupBox2.Visible == false)
        {
            groupBox1.Visible = false;
            groupBox2.Visible = true;
        }
        if (groupBox1.Visible == false)
        {
            groupBox1.Visible = true;
            groupBox2.Visible = false;
        }

    }
  • 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-10T06:39:30+00:00Added an answer on June 10, 2026 at 6:39 am

    Your problem is that after the first if-statement, it immediately checks if groupBox1.Visible is false, which it always will be. It then proceeds to flip it back.

    Change the if to an else, or at least and else if and your code will work.

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

Sidebar

Related Questions

I have searched/Googled around but I'm struggling with the following problem. I am building
Possible Duplicate: Why are two different concepts both called “heap”? I've googled around, but
NOTE : My problem is NOT that my links are not being replaced. But,
I've googled around but couldn't find a working MongoDB viewer or data browser. An
I've googled around everywhere, but cannot find much for rendering strings to textures and
I've checked Wikipedia and googled but I still can't wrap my mind around how
I've done a lot of searching on SO and google around this problem, but
I poked around StackOverflow and Google, but I found articles little too older that
I'm trying to understand something that , by googling around, seems like a bug
I've googled this, as well as checked the documentation , but not been able

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.