Dynamically Changing Form Background ?

poppey

New member
Joined
Jan 28, 2006
Messages
1
Location
Riyadh
Programming Experience
1-3
I am a newbie in .NET

How can i change the From Backcolor dynamically?

I have a ScrollBar on the form

what i want is to change the backcolor of the form as per the value of ScrollBar, Min, Max for scroll bar is set to 1, 255 respectively.

Requirement: on the run time when ever the value of the ScrollBar changes accrdingly the form backcolor has to change.

Can any one please help me.

=====================================================
Me
.BackColor = System.Drawing.Color.FromArgb(Val(HScrollBar1.Value))

this code give me error unhandled exception.

=====================================================
Thanks
 
ARGB means color channels alpha, red, green and blue, each can have a value of 0-255, and these value together makes a 'color'.
I would go for the overloads to set RGB .FromArgb(HScrollBar1.Value, HScrollBar1.Value, HScrollBar1.Value) or set up 3 scrollbars one for each base color channel RGB.
 
Back
Top