The Control.Enabled property (=false) should do it... or just create a copy
of your image replacing all white with the light grey and every other color
with dark grey.
Cheers
Daniel
--
http://www.danielmoth.com/Blog/
> Hi everyone
>
[quoted text clipped - 6 lines]
> Thanks in advance
> Dan
Dan - 19 Feb 2005 01:36 GMT
Arh I did wonder if the easiest way would just be to have a copy of the
image, I know how to do it in the full framework for changing it on the fly
on just one image.
Dan
> The Control.Enabled property (=false) should do it... or just create a
> copy of your image replacing all white with the light grey and every other
[quoted text clipped - 16 lines]
>> Thanks in advance
>> Dan
So it will get like disabled, convert a certain Image as grayscale by
computing Y value (is the grayscale component in YIQ) by this formula:
Y = 0.299 * R + 0.587 * G + 0.114 * B
and then use Y value as R, G, B parameters for a color. See the code
snippet bellow, "dst" variable will contain grayscale image from
"source" bitmap:
Bitmap dst = new Bitmap(source.Width, source.Height);
for(int y=0; y < dst.Height;y++)
{
for(int x=0; x < dst.Width; x++)
{
Color c = source.GetPixel(x, y);
// alternatively Y = (77 * c.R + 150 * c.G + 29 * c.B) >> 8
int Y = (int)(c.R * 0.299 + c.G * 0.587 + c.B * 0.114);
dst.SetPixel(x, y, Color.FromArgb(Y, Y, Y));
}
}
Hope this help,
Sergey Bogdanov
http://www.sergeybogdanov.com
> Hi everyone
>
[quoted text clipped - 6 lines]
> Thanks in advance
> Dan
Dan - 19 Feb 2005 10:00 GMT
Hi Sergey
That worked first time thats brilliant, thanks a lot.
Thanks again
Dan
> So it will get like disabled, convert a certain Image as grayscale by
> computing Y value (is the grayscale component in YIQ) by this formula:
[quoted text clipped - 33 lines]
>> Thanks in advance
>> Dan