vis781
Well-known member
This has been bothering me for some time. Does anyone know how to get the GetColorRef Macro to work in VB.Net. Documentation is poor on this subject and i only have a C# example that i can't get to work in VB.Net. Forget the online converters, free or otherwise. As they don't seem to work. I'm not totally sure but it's almost as if bit shifting works differently in VB.Net, but as my C# is ok at best i can't be sure. Here it is. I appreciate any responses. Here's the C#....
P.s I know i can use the ColorTranslator.ToWin32 and this is a bit of pointless excercise but i would just like to see it work. Call it a challenge
VB.NET:
public static int GetColorRef(int r, int g, int b)
}
return (((byte) r) | ((byte) g) << 8)) | (((byte) b) << 0x10));
}
P.s I know i can use the ColorTranslator.ToWin32 and this is a bit of pointless excercise but i would just like to see it work. Call it a challenge