i would like to have a trackbar on my form that will correspond to the HUE of the color of the backgruond, given a range of 1 to 360, and another trackbar that will correspond to saturation of the color of the backgruond, within a range of 1 to 50.
R – implementing a trackbar that will change background color of form
vb.netwinforms
Related Topic
- C# – How to make a textbox that only accepts numbers
- C# – How to update the GUI from another thread
- R – can i control opaqueness of form with a trackbar
- R – change hue/saturation of screen without using form background color
- R – Why are max values for saturation and hue are 240 and 239 respectively
- R – purpose of dividing saturation / 50 and hue / 50
Best Answer
Using the
HSVtoRGB
procedure found here, you can hook both yourTrackBar
controls to the same event handler and use this code:Edit: Here is the corrected procedure since the one in the link doesn't really follow best practices: