Creating custom progressbar [help]

09/12/2016 13:15 Proxynear#1
Hi everyone, i was messing around and cant find how i'll start creating my progressbar. I got a launcher design, and the progress bar is there.
So my idea is take the progressbar background from design and set it in c# one, and edit the green updating to a texture.

Can anyone explain me this better?
09/12/2016 17:20 Devsome#2
#moved…
09/12/2016 19:59 YatoDev#3
There is a designer for custom controls aka user controls.

Just use the graphics library to load the pic and resize / snip it. there are builtin functions for this.

this might be helpful (isn't runable cause i used the forms designer)

09/12/2016 20:24 Proxynear#4
Thanks but what you do on that case? Draw it? Cuz i dont wanna draw any style or colour, i wanna change completly the background of loader and change as you told the progress bar incrementing the image as i think it does with the draw.
09/12/2016 23:11 YatoDev#5
the FlatProgressBar_Paint method gets called every time the ui need a refresh. also if the progress changed. You can snip the picture to the percentage with very easy math.

You dont want to change the entire background. you just want to draw a small part of the picture into you custom control.

if i understand you right.

so this can be done with the graphics object from PaintEventArgs
09/13/2016 08:19 Proxynear#6
Thanks for help, i'll take a look into it!
09/14/2016 20:03 Xio.#7
Don't do it in WinForms and use WPF instead. WPF can do that out of the box, you can simply add an image to the progressbar...
09/14/2016 20:17 YatoDev#8
Quote:
Originally Posted by Xio. View Post
Don't do it in WinForms and use WPF instead. WPF can do that out of the box, you can simply add an image to the progressbar...
What he want's cant be done out of the box. Also you need to expect he migth not be familiar to wpf or has a WinForms code base
09/14/2016 21:56 Proxynear#9
Most of people and tutorials i found, just explain to draw colours inside the bar and not change the style of progress bar with a image and inside of the image, the value to a image not a color.
09/15/2016 09:50 Xio.#10
Quote:
Originally Posted by »FlutterShy™ View Post
What he want's cant be done out of the box. Also you need to expect he migth not be familiar to wpf or has a WinForms code base
That's why you posted winforms code eh?
09/15/2016 15:47 Proxynear#11
What you mean Xio?
09/15/2016 19:26 YatoDev#12
Quote:
Originally Posted by Xio. View Post
That's why you posted winforms code eh?
I would call it a "safe bet" to post winforms code.

A lot of people are still using winforms and old net frameworks.

and in this case it was the right choice.

So what exactly do you want now?
09/15/2016 20:01 Xio.#13
Quote:
Originally Posted by Proxynear View Post
What you mean Xio?
[Only registered and activated users can see links. Click Here To Register...]

I mean doing it the proper way, start here, then figure it out on your own, you're a dekaron developer (whatever that is) or so you claim, if you don't know how to solve problems you're nothing more than a wannabe :)

Without telling us [Only registered and activated users can see links. Click Here To Register...] there is little we can do for you. If you simply want the solution - good luck finding someone who's going to write down the code just for you, for free.

Quote:
Originally Posted by »FlutterShy™ View Post
I would call it a "safe bet" to post winforms code.

A lot of people are still using winforms and old net frameworks.

and in this case it was the right choice.

So what exactly do you want now?
[Only registered and activated users can see links. Click Here To Register...]
09/15/2016 22:59 YatoDev#14
Quote:
Originally Posted by Xio. View Post
~Snip~
[Only registered and activated users can see links. Click Here To Register...]

He has a WinForms codebase and is not a professional. Wpf overkill here
09/15/2016 23:26 Proxynear#15
Btw i appreciate the help, but Flutter is helping me out with that yes and im not using wpf