Click here to Skip to main content
13,144,958 members (52,867 online)
Click here to Skip to main content
Add your own
alternative version


5 bookmarked
Posted 5 Jun 2012

AlSayed Color TrackBar

, 5 Jun 2012
Rate this:
Please Sign up or sign in to vote.
AlSayed ColorBar is a TrackBar best for professional color picker, like the one used in Adobe Photoshop.

بســم الله الرحـــمــن الرحــيـــم 


AlSayed ColorBar is a control used to help with making colorpicker for professional applications. This control is the same as Photoshop colorpicker trackbars, it can change its color in a very fast way.


This control can be used as a Hue, Saturation, Lightness, and more Types of TrackBars ...
You can change the maximum/minimum value of this control from its properties the same as default TrackBar.

Also many appearance properties have been included in the control to set the style as you want.

Using the Code

If you want to use a custom TrackBar Style Image, you first need to set BarGradientColor1 and BarGradientColor2 to transparent color to avoid the selected color from appearing.

To make 3 Color TrackBars functions together to form a new color picker, you can use a code for each colorbar ValueChanged Event like this:


AlSayedColorbar1.BarGradientColor1 = 
	Color.FromArgb(0, AlSayedColorbar2.value, AlSayedColorbar3.value)
AlSayedColorbar1.BarGradientColor2 = 
	Color.FromArgb(255, AlSayedColorbar2.value, AlSayedColorbar3.value)
AlSayedColorbar2.BarGradientColor1 = 
	Color.FromArgb(AlSayedColorbar1.value, 0, AlSayedColorbar3.value)
AlSayedColorbar2.BarGradientColor2 = 
	Color.FromArgb(AlSayedColorbar1.value, 255, AlSayedColorbar3.value)
AlSayedColorbar3.BarGradientColor1 = 
	Color.FromArgb(AlSayedColorbar1.value, AlSayedColorbar2.value, 0)
AlSayedColorbar3.BarGradientColor2 = 
	Color.FromArgb(AlSayedColorbar1.value, AlSayedColorbar2.value, 255)  


AlSayedColorbar1.BarGradientColor1 = 
	Color.FromArgb(0, AlSayedColorbar2.value, AlSayedColorbar3.value);
AlSayedColorbar1.BarGradientColor2 = 
	Color.FromArgb(255, AlSayedColorbar2.value, AlSayedColorbar3.value);
AlSayedColorbar2.BarGradientColor1 = 
	Color.FromArgb(AlSayedColorbar1.value, 0, AlSayedColorbar3.value);
AlSayedColorbar2.BarGradientColor2 = 
	Color.FromArgb(AlSayedColorbar1.value, 255, AlSayedColorbar3.value);
AlSayedColorbar3.BarGradientColor1 = 
	Color.FromArgb(AlSayedColorbar1.value, AlSayedColorbar2.value, 0);
AlSayedColorbar3.BarGradientColor2 = 
	Color.FromArgb(AlSayedColorbar1.value, AlSayedColorbar2.value, 255); 

Points of Interest

It is easier to use, facilitates work, and is a very fast control.


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


About the Author

Abed AlSayed
Lebanon Lebanon
No Biography provided

You may also be interested in...

Comments and Discussions

GeneralMy vote of 1 Pin
hoseinhero27-Jun-12 22:47
memberhoseinhero27-Jun-12 22:47 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

Permalink | Advertise | Privacy | Terms of Use | Mobile
Web01 | 2.8.170915.1 | Last Updated 5 Jun 2012
Article Copyright 2012 by Abed AlSayed
Everything else Copyright © CodeProject, 1999-2017
Layout: fixed | fluid