Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Windows Forms / WinForm General / September 2004

Tip: Looking for answers? Try searching our database.

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

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
kajol - 24 Sep 2004 10:09 GMT
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
Morten Wennevik - 24 Sep 2004 10:47 GMT
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.

Signature

Happy Coding!
Morten Wennevik [C# MVP]

kajol - 28 Sep 2004 14:15 GMT
Hello Morten Wennevik
Thanks for the reply
kajol

> 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.
Sijin Joseph - 26 Sep 2004 16:26 GMT
Check out these two controls
http://www.windowsforms.net/ControlGallery/ControlDetail.aspx?Control=491&tabindex=10
http://www.windowsforms.net/ControlGallery/ControlDetail.aspx?Control=398&tabindex=10

Sijin Joseph
http://www.indiangeek.net
http://weblogs.asp.net/sjoseph

> Hi Everyone
>
[quoted text clipped - 14 lines]
>
> Thanks
kajol - 28 Sep 2004 14:15 GMT
Hello Sijin Joseph
Thanks for the reply
kajol

> Check out these two controls
> http://www.windowsforms.net/ControlGallery/ControlDetail.aspx?Control=491&tabindex=10
[quoted text clipped - 22 lines]
> >
> > Thanks

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.