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

  • Home
  • SEARCH
  • 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 1071305
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T20:41:47+00:00 2026-05-16T20:41:47+00:00

In many code examples I have found the DisplayRectangle property of a Control object

  • 0

In many code examples I have found the DisplayRectangle property of a Control object being used.
However this property does not appear in the intellisense popup, neither does it get any syntax highlighting, but it does compile and work as expected.

Should I use this kind of Property?

How can I find out about more of them, can they be activated in intellisense?

Update/Clarification: I have now found out that it does seem that it depends on which control. The following code does compile:

        Control c = sender as Control;
        Form f = sender as Form;
        PictureBox p = sender as PictureBox;
        Console.Write(c.DisplayRectangle); // No Intellisense
        Console.Write(f.DisplayRectangle); // Intellisense
        Console.Write(p.DisplayRectangle); // No Intellisense

My question was about the DisplayRectangle for PictureBox, or Controls in general.

  • 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-16T20:41:47+00:00Added an answer on May 16, 2026 at 8:41 pm

    This is the declaration of the property:

    [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
    [EditorBrowsable(EditorBrowsableState.Advanced)]
    [Browsable(false)]
    [SRDescription("ControlDisplayRectangleDescr")]
    public virtual Rectangle DisplayRectangle
    {
        get
        {
            return new Rectangle(0x0, 0x0, this.clientWidth, this.clientHeight);
        }
    }
    

    Starting with [Browsable], that attribute ensures that the property doesn’t show up in the Properties window. Which makes sense because it is a runtime property and there is no setter. That’s also the relevance to [DesignerSerializationVisibility], it ensures that the property value doesn’t get written to the InitializeComponent() method. [SRDescription] is for localization.

    [EditorBrowsable] is relevant to your question. Using EditorBrowsableState.Advanced ensures that IntelliSense will only display the property if the editor is operating in ‘Show advanced IntelliSense info’ mode. The only IDE that I know that uses this feature is VB.NET, its IntelliSense popup window has an “All” tab but defaults to “Common”. But not the C# IDE, the language you tagged your question with.

    I have to guess that you are actually programming in VB.NET, not C#. Click the All tab on the popup.

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

Sidebar

Related Questions

I have found some similar questions like this one, however there are so many
Firstly, I have found many examples of how to grab data from a db
Many C++ books contain example code like this... std::cout << Test line << std::endl;
I have come across the following type of code many a times, and I
Many beginning programmers write code like this: sub copy_file ($$) { my $from =
This code is executed by many way. When it's executed by the form button
In many places in our code we have collections of objects, from which we
I have code similar to the following in many places: var dbParams = db.ReadParams(memberID,
I have many small files containing code fragments, pseudo-code algorithms, classes, templates, SQL-samples, etc.,
I have looked at many examples for validating an XML file against a DTD,

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.