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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T05:37:02+00:00 2026-05-12T05:37:02+00:00

When manipulating controls on a .NET windows form which of the following is best

  • 0

When manipulating controls on a .NET windows form which of the following is best practice and why?

//Hide control from user and stop control form being useable
oControl.Enabled = false;
oControl.Visible = false;

or

//Hide control from user and stop control form being useable
oControl.Visible = false;

I’ve been using the first case and always disabling a control when hiding it, but I’ve been told that this is wrong and that I should only be hiding it. I seem to vaguely remember reading somewhere that if you don’t specifically dissable a control that it can continue to interact with the user.

Any enlightenment would be apreciated.

  • 1 1 Answer
  • 1 View
  • 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-12T05:37:03+00:00Added an answer on May 12, 2026 at 5:37 am

    Enabled refers to whether or not the user can interact with the control (i.e. if the control is grayed out or not)

    Visible refers to wehether or not the control is displayed (usually if this is false the control is not rendered at all, however not all the time apparently – see the comments of this post).

    If the control is not rendered then the value of the enabled propery will have no impact.

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

Sidebar

Related Questions

I am developing a user control (ascx) in ASP.NET which uses javascript for manipulating
I have two controls which are both contained within a user control. Panel location:
I know that when manipulating UI controls from any non-UI thread, you must marshal
which one should be used to manipulating data, Array or Array Object? Like search,sort
I'm having some trouble manipulating a complex array which looks like this: Array (
Is there a way to turn off all visual updates to a .NET form
I'm looking for a JQuery-style javascript/CSS control that will allow the user to drill
I have a FormView control in an ASP.NET page. I use the InsertItemTemplate and
I have a this asp.net page which upon first time load: 1: Make a
I need to listen for controls=controls attribute being added to the video tag after

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.