"Starbuck" <ke*@kevsbox.com> wrote in message
news:%2****************@TK2MSFTNGP14.phx.gbl...
In a previous versino of one of our apps we would store numeric
values such as 16777088 which we used to set the grid colors of
a job on a TrueGrid grid in VB6.
Now in VB.Net we are using the DataGrid and cannot convert these
integer values to System.Drawing.Brush values.
Create a new SolidBrush from the RGB components of your numeric
colour value. If you're /lucky/, you /might/ get away with ...
Dim z as New SolidBrush( Color.FromArgb( 16777088 ) )
.... but only if the "old" and "new" R, G and B components are in the
same order - I'm not sure they are. If not, you'll have to break your
numeric colour down into the three colour components and use
Dim c as Integer = 16777088
Dim R As Integer = (c And &HFF)
Dim G As Integer = (c And &HFF00) >> 8
Dim B as Integer = ( c And &HFF0000 ) >> 16
Dim z as New SolidBrush( Color.FromArgb( 0, R, G, B ) )
HTH,
Phill W.