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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T15:38:19+00:00 2026-05-31T15:38:19+00:00

I am trying to make a simple Windows Form application that will show different

  • 0

I am trying to make a simple Windows Form application that will show different options based on the values of preceding elements – for example I have four radio buttons at the top of the form, each one will show and hide elements various other elements within the form – essentially making several forms in one.

I have this set up in a large conditional statement (this is only a small portion, but it is all similar):

private void Payment_Load(object sender, EventArgs e)
  {
            if (rdoMultChoice.Checked)
            {

                lblGroupBox1_MC.Visible = true;
                lblGroupBox1_FITB.Visible = false;
                lblGroupBox1_TF.Visible = false; 
             // etc...
            }
            else if (rdoFillInBlank.Checked)
            {
                lblGroupBox1_MC.Visible = false;
                lblGroupBox1_FITB.Visible = true;
                lblGroupBox1_TF.Visible = false;
             // etc...
            }

The problem is, when I run the application the form completely ignores these statements and appears to just make all of my elements visible.

http://msdn.microsoft.com/en-us/library/754w18dd.aspx

This link is sort of similar to my needs. I tried to adapt it to my situation but it didn’t appear to work (can’t guarantee that I did it correctly…).

Seems like this should be a really simple thing to do but I am new to C# and only started using it this week – an assignment for a CS class. Just to rant, we are expected to develop “expertise” in 13 languages in 15 weeks! With very few resources provided by the university, so far the only expertise I have developed is in searching documentation and stack overflow! 🙂

  • 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-31T15:38:20+00:00Added an answer on May 31, 2026 at 3:38 pm

    First thing I would do is put a breakpoint in your code:

    private void Payment_Load(object sender, EventArgs e)
    {
       if (rdoMultChoice.Checked)  // <-- Put breakpoint here.
    

    You want to know if Payment_Load is being executed.

    Next, after you’re certain it is being executed, check your code to see if there is anything that might be changing the label’s visibility. it could be another piece of code which is changing the .Visible setting.

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

Sidebar

Related Questions

I'm trying to make a simple Windows form app that does things. I'd like
I'm trying to create a windows form application that manipulates data from several tables
I am trying to make a simple phone directory program in windows console application.
I'm trying to make a simple build script that would work on windows and
I'm trying to make a simple form that contains textboxes that draw from a
I'm trying to make a simple C# web server that, at this stage, you
I'm a total n00b to c++ and am trying to make a simple form
I'm trying to make a simple Windows Phone 7 Silverlight app. There's the MainPage.xaml
I am trying to make a simple web application using ASP.NET and Interop COM.
I'm trying to make a simple hello-world executable python gui app in windows using

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.