![]() |
|
[C#] ProgressBar control with text / percentage! - Printable Version +- Hack Forums (https://hackforums.net) +-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444) +--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151) +---- Forum: Software Development (https://hackforums.net/forumdisplay.php?fid=118) +---- Thread: [C#] ProgressBar control with text / percentage! (/showthread.php?tid=4510732) |
ProgressBar control with text / percentage! - Delirium™ - Oct 27, 2014 Hello. I was in need of a progress bar with the ability to display the percentage on it and using a label onto a default progress bar sounded like a dumb method therefore, I wrote my own custom progress bar control with the ability to display text or percentage built-in. Here's the source: Code using System;Nothing significant at all but could be useful to a couple of people. Enjoy. * - Hiiro - Oct 28, 2014 What is uxtheme.dll? Should I already have this library on my computer? EDIT: Found it in System32, Thanks :P * - Delirium™ - Oct 28, 2014 (Oct 28, 2014 05:59 PM)Austrix Wrote: What is uxtheme.dll? It's part of the Windows OS which handles painting and stuff. The code which utilizes the Uxtheme.dll prevents the progress bar from flickering on the designer and the form. * - WZDY - Oct 29, 2014 A couple of days ago I made a progressbar with % and it was like a few lines of code. How come your be so much? Anyways, thanks for the share but you could've made this alot easier. * - Hiiro - Oct 29, 2014 (Oct 29, 2014 12:45 PM)The Flash ϟ Wrote: A couple of days ago I made a progressbar with % and it was like a few lines of code.It just looks like a lot because he's calling OnHandleCreated and centering his text, etc. * - WZDY - Oct 29, 2014 He could just do it in the Properties of the textbox? * - Only3 - Oct 29, 2014 (Oct 29, 2014 01:12 PM)The Flash ϟ Wrote: He could just do it in the Properties of the textbox? 😊 what textbox want short code Code class TextProgressBar : ProgressBar* - Delirium™ - Nov 2, 2014 (Oct 29, 2014 01:12 PM)The Flash ϟ Wrote: He could just do it in the Properties of the textbox? I am not using any textbox. I am drawing and centering the text manually. The code looks long probably because of the newlines I'm using to make the code cleaner and more beautiful. Or maybe because I have also implemented the ability to add custom text instead of percentage which takes up a few more lines. |