❓ Need some Color Help

Posts 1–6 of 6 · Page 1 of 1
❓ Need some Color Help
hey guys umm how do i choose a SYSTEM color for the background of a label??? normaly you have to pick a WEB color.

i want to do it in code and not selecting in the PROPERTIES menu
SystemColors.XXXXX works fine.
asdf
/my mistake
Quote Originally Posted by HiddenoO View Post
[php]Label1.BackColor = Color.Red[/php]
'You'll get an arrangement of colors after typing ' . ' after Color.
He said system colors NOT web colors.
Quote Originally Posted by Jason View Post


He said system colors NOT web colors.
Ohh, I see...My mistake :P

Use this;

[php]
Label1.BackColor = System.Drawing.SystemColors.(Whatever you'd like)
[/php]


A. Imports System.Drawing (as a rule of thumb, so to speak)

/

Next.

@ HiddenoO it would be

Code:
Label1.BackColor = System.Drawing.Color.Red
NOT

Code:
Label1.BackColor = System.Drawing.SystemColors.
What you put is the system object for color structures, not a specific color

a example would be

Code:
Label1.BackColor = System.Drawing.SystemColors.ActiveCaption
Which will get the color of a structure, in this case the background color of the active window's title bar.

or

Code:
Me.BackColor = SystemColors.Control
This however is Easy and woks

Code:
Label1.BackColor = Color.FromName("Color Here")
Examples"

Code:
Label1.BackColor = Color.FromName("Red")
Code:
Label1.BackColor = Color.FromName("Blue")
Posts 1–6 of 6 · Page 1 of 1
This thread is closed for replies.

Tags for this Thread

None

Talk with us