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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T14:09:19+00:00 2026-05-28T14:09:19+00:00

I’m using VB 2008 express but this probably applies to all .net environments. My

  • 0

I’m using VB 2008 express but this probably applies to all .net environments.

My question has to do with labels that do nothing. No events, and their text never changes. They just sit there above textboxes and other gizmos so the user knows what each doohickey is for. That’s their whole job. Simple. No code whatsoever. (Other than the code written by the form designer.)

My issue is there are so damned MANY of them! My app has multiple tabs on the same form, and each tab has a lot of objects and each has an associated label. Since I never bothered to name them, I now have a label with the name Label224. That’s right, 224 labels! It’s getting ridiculous. When I view the properties window, sometimes I wish to select an object by name using the drop down and they force a lot of scrolling.

QUESTION: Is there a way to make the sheer number of unnamed labels (or any type of object that isn’t referenced in code) less obtrusive during development?

I could load them in code of course. That would be fine, but it’s nice to lay them out graphically without the trial and error of running the code to see if the positioning is right.

  • 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-28T14:09:20+00:00Added an answer on May 28, 2026 at 2:09 pm

    A couple of things.

    Set each label’s GenerateMember property to false:

    label1.GenerateMember = False
    

    This will prevent the Label from appearing in the code view combo boxes and intellisense.

    Other than that, you just have too many controls.

    You mentioned “tabs”, in which case, you can try to move each tab of stuff into a separate usercontrol, and then you are only loading a single usercontrol for each tab. It doesn’t reduce the number of controls, but it makes it a little more manageable.

    The other “job” of a label is to provide mnemonic control activation for the next control in the tab order. If you are not using this, you can try “cheating” and getting rid of the labels all together, and “paint” the label next to each control in the container’s paint event. You could put the display of the label in a control’s tag property, and paint on that. Not necessarily the greatest suggestion.

    Example:

    Private Sub Form1_Paint(ByVal sender As Object, ByVal e As PaintEventArgs) Handles MyBase.Paint
      For Each c As Control In Me.Controls
        If c.Tag IsNot Nothing Then
          TextRenderer.DrawText(e.Graphics, c.Tag.ToString, Me.Font, _
                                New Rectangle(c.Left - 100, c.Top, 100, c.Height), _
                                Color.Black, Color.Empty, TextFormatFlags.VerticalCenter)
        End If
      Next
    End Sub
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I want to count how many characters a certain string has in PHP, but
I've got a string that has curly quotes in it. I'd like to replace
I have a French site that I want to parse, but am running into
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
link Im having trouble converting the html entites into html characters, (&# 8217;) i
For some reason, after submitting a string like this Jack’s Spindle from a text
I am reading a book about Javascript and jQuery and using one of the

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.