How to display the Progress (%) in the middle of a Progress Bar...

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi Everyone

Can anyone tell me how can I display the progress in percentage in the
middle of the progress bar with "invert color" using VB.NET, this is very
common and available with most of the applications, like

at the begining the text "0%" is shown in black text and the background
color of the progress bar is white

and at the end, when the progress bar is filled with blue color then the
"100%" text is in white color

when the progress is in the middle that is "50%" then "5" appears in white
color and "0%" appears in black color

I want to have this type of effects

Thanks
 
Hi kajol,

I did something just like that using my own ProgressBar once.
If I remember how I did it, I believe you need to handle the Paint procedure and do two sets of FillRectangle and DrawStrings with opposite colors. The size of the rectangles followed the progress. I think SystemColors.Desktop is the default progressbar color.
 
Back
Top