[StructLayout(LayoutKind.Sequential)]
struct COLORREF {
public byte R;
public byte G;
public byte B;
public Color ToColor() {
return Color.FromArgb((int)R, (int)G, (int)B);
}
public override string ToString() {
return string.Format("({0},{1},{2})",R,G,B);
}
}
Structure COLORREF
Public R As Byte
Public G As Byte
Public B As Byte
Public Overrides Function ToString() As String
Return String.Format("({0},{1},{2})", R, G, B)
End Function
End Structure
None.
None.