Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

VB Colors

Name: Anonymous 2011-10-31 9:25

could anybody tell me how to invert a color of a given panel in visual basic?
i guess i'm supposed to subtract the color from 255,255,255
and the result should be the inverted color.
but how do i get the RGB values? and how would i tell the color which values for RGB to use?

i'm new to programming so please be nice.

Name: Anonymous 2011-10-31 9:35

mailto:sage

Name: Anonymous 2011-10-31 9:43

if i convert the color to string i get
"Color[A=255, R=0, G=255, B=64]"
or
"Color[Black]

if i convert it toargb, i get values between
-1 and -16777216 from white to black

but i realy dont know where to go from there...

Name: Anonymous 2011-10-31 10:01

[code]butan.BackColor = Color.FromArgb(255 - butan.BackColor.R, 255 - butan.BackColor.G, 255 - butan.BackColor.B)[code]

Name: Anonymous 2011-10-31 10:09

thank you very much kind sir! but somehow it doesn't work for the predefinded colors like black, white, yellow, green, etc.
do i have to turn the predefined colors into rgb or how would one fix that issue?

Name: Anonymous 2011-10-31 10:14

nevermind i just made a misstake. thank you very much again.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List