Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Programming Talk / VB / VB.net - Converting Color to integer

Author
Message
BatVink
Moderator
22
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 1st Aug 2007 16:55
Anyone know how to convert a System.Drawing.Color value (ARGB) to an integer, and vice-versa?

This is not valid (Reference to a non-shared member requires an object reference.)

Dim tColor As System.Drawing.Color
tColor = System.Drawing.Color.ToArgb(MyColourValue)


CattleRustler
Retired Moderator
21
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 1st Aug 2007 17:32
does adding the New keyword help at all?

Dim tColor As NEW System.Drawing.Color

My DBP plugins page is now hosted [href]here[/href]

Login to post a reply

Server time is: 2025-05-07 11:33:38
Your offset time is: 2025-05-07 11:33:38