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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T00:59:54+00:00 2026-06-17T00:59:54+00:00

I created a progress bar which works perfectly. I recently added percentages but I’d

  • 0

I created a progress bar which works perfectly. I recently added percentages but I’d like to display the label on top of the progress bar.

Like so:

enter image description here

The only problem as you can see is that the background is not transparent. Dispite having:

lblPercentage.BackColor = Color.Transparent

on form load… Is there something that can be done for this?

  • 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-17T00:59:55+00:00Added an answer on June 17, 2026 at 12:59 am

    The Transparent BackColor actually works. The problem is that the label gets its BackColor from the form, since the form is its Parent. Therefore we must make the progress bar its parent and adapt its location as well, since now it must be specified relative to the progress bar. Add this code to your form:

    Public Sub New()
        InitializeComponent()
    
        Dim pos As Point = PointToScreen(lblPercentage.Location)
        pos = myProgressBar.PointToClient(pos)
        lblPercentage.Parent = myProgressBar
        lblPercentage.Location = pos
        lblPercentage.BackColor = Color.Transparent
    End Sub
    

    Alternatively you can calculate the location of the label like this

    lblPercentage.Location = New Point(lblPercentage.Location.X - myProgressBar.Location.X,
                                       lblPercentage.Location.Y - myProgressBar.Location.Y)
    

    You cannot make this in the designer, since your progress bar is probably not a container control (i.e. placing a label on it does not make it a child control of the bar) and you will not see the result in the designer.


    UPDATE

    You could also try these alternatives:

    • Draw the percentage number in the OnPaint method of your control (override OnPaint).
    • Do what I showed you above inside the progress bar. You could add the label programmatically in the constructor of the progress bar.
    • Use a UserControl as base class of your progress bar. This would allow you to place the label on it in the designer.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Code below works well on Firefox - displays progress bar which progresses on every
I have created a C# COM DLL which is essentially an enhanced progress bar
As I created a Progress bar using below code in a on click method
how do you update a win forms control (ex. label, progress bar) from another
I'm creating an ajax upload component which consists of a progress bar for each
I have created a website loading progress bar using Jquery UI Progress bar. This
I am trying to create a progress bar which does not need to show
I have created a form on which two components are present, button and progressbar
I have to create a progress bar in a webapp. I need a thread
how to create a progress bar column in DataGrid control in c#

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.