|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Alternative use for ColorEver needed to get byte values from an integer?
just convert the integer to a color using Color.FromARGB and then use the A,R,G,B properties and to do the reverse use Color.FromARGB(A,R,G,B) It is undoubtedly bad practice but it makes things easy! guy "guy" <g**@discussions.microsoft.com> wrote in message Err, thanks for the tip, but it's a little obscure.news:42684578-C43B-465C-A364-3EF1CABDBD36@microsoft.com... > Ever needed to get byte values from an integer? > > just convert the integer to a color using Color.FromARGB and then use the > A,R,G,B properties > > and to do the reverse use Color.FromARGB(A,R,G,B) > > It is undoubtedly bad practice but it makes things easy! > > guy I can't imagine what the maintenance coder would say in five years time when he's tweaking my code and comes across something like that. I'll stick with the bitconvertor.
Visual Basic to be discontinued in 2008??
Saving the Color value into a string How do I even start debugging this. User Interface Design - Books? 2 dimensional array question programmatically allow tcp/ip to msde Radio buttons - best practice "Attempted to read or write protected memory" since 10 days... ADO.NET Rowfilter - between 2 dates ClickOnce program fails to run properly after update |
|||||||||||||||||||||||