RGB Problem

GamesRule
01-11-2004, 01:44 AM
Hey

Having a problem with this, once again suffering from the jump between VB6 and .Net

Using three scrollbars to control the red, green and blue elements of a backcolor.

SO I Have...

panel1.Backcolor = RGB(scrRed.Value,scrGreen.Value,scrBlue.Value)

This code is in each scrollbars scroll event. It wont let me run the program due to "Value of type "Integer" cannot be converted to "System.Drawing.Color".

Anyone know how to solve this?

Csharp
01-11-2004, 03:54 AM
you can use the Color.FromArgb function , eg: on a basic red you would do this ....

Panel1.BackColor = Color.FromArgb(Color.Red.R, Color.Red.G, Color.Red.B)

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum