private int ConvertColorToRGB(Color col)If you are using VB.NET, it still has an RGB function to call.
{
return (col.R) | (col.G << 8) | (col.B << 16);
}
This blog is a depository for things I have found regarding VB.NET and C#.NET development (and other things I may need to remember). This blog is primarily for my own reference, but if the information I found is useful to others, then that is great. If others want to contribute with comments or other information, then that is great too.
Friday, October 21, 2011
Computing RGB composite Color Value in C#
If you still have to deal with the Win32Api in C#, you may need to get the old-style RGB composite color values from a .NET Color value. The ToArgb method doesn't work like you want, so it has to be computed:
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment