When displaying the Color Picker for a web page (in the VS IDE), Background
is listed on the System Colors tab.
Also,
Color.FromName("Background").IsNamedColor
returns True.
However, Background is not a member of the SystemColors class, and it is not
a member of the KnownColors enum nor the Color structure.
Where can I find this named colour? I want to be able to enumerate all named
colours programmatically, but I cannot find this one (and one or two
others).
TIA
Charles 4 1833
Seems that the IsNamedColor is checking the name attribute, rather than the
enumeration. IsKnownColor will work correctly. The enumeration is documented
at: http://msdn.microsoft.com/library/de...classtopic.asp
and as you noted doesn't contain the Window Background color. I am going to
forward this to the product team. As a work around you may want to use the
Win32 API to investigate the system color palette.
Cheers,
Richard Burte
"Charles Law" <bl**@thingummy.com> wrote in message
news:#b*************@TK2MSFTNGP10.phx.gbl... When displaying the Color Picker for a web page (in the VS IDE),
Background is listed on the System Colors tab.
Also,
Color.FromName("Background").IsNamedColor
returns True.
However, Background is not a member of the SystemColors class, and it is
not a member of the KnownColors enum nor the Color structure.
Where can I find this named colour? I want to be able to enumerate all
named colours programmatically, but I cannot find this one (and one or two others).
TIA
Charles
Thanks for the response Richard. I will have a look at the API.
Charles
"Richard Burte" <rb****@online.microsoft.com> wrote in message
news:ek**************@tk2msftngp13.phx.gbl... Seems that the IsNamedColor is checking the name attribute, rather than
the enumeration. IsKnownColor will work correctly. The enumeration is
documented at:
http://msdn.microsoft.com/library/de...classtopic.asp and as you noted doesn't contain the Window Background color. I am going
to forward this to the product team. As a work around you may want to use the Win32 API to investigate the system color palette.
Cheers,
Richard Burte "Charles Law" <bl**@thingummy.com> wrote in message news:#b*************@TK2MSFTNGP10.phx.gbl... When displaying the Color Picker for a web page (in the VS IDE), Background is listed on the System Colors tab.
Also,
Color.FromName("Background").IsNamedColor
returns True.
However, Background is not a member of the SystemColors class, and it is not a member of the KnownColors enum nor the Color structure.
Where can I find this named colour? I want to be able to enumerate all named colours programmatically, but I cannot find this one (and one or two others).
TIA
Charles
There is a managed collection that returns this information -
System.Drawing.SystemColors
"Charles Law" <bl**@thingummy.com> wrote in message
news:uI**************@TK2MSFTNGP10.phx.gbl... Thanks for the response Richard. I will have a look at the API.
Charles
"Richard Burte" <rb****@online.microsoft.com> wrote in message news:ek**************@tk2msftngp13.phx.gbl... Seems that the IsNamedColor is checking the name attribute, rather than the enumeration. IsKnownColor will work correctly. The enumeration is documented at:
http://msdn.microsoft.com/library/de...classtopic.asp and as you noted doesn't contain the Window Background color. I am going
to forward this to the product team. As a work around you may want to use
the Win32 API to investigate the system color palette.
Cheers,
Richard Burte "Charles Law" <bl**@thingummy.com> wrote in message news:#b*************@TK2MSFTNGP10.phx.gbl... When displaying the Color Picker for a web page (in the VS IDE), Background is listed on the System Colors tab.
Also,
Color.FromName("Background").IsNamedColor
returns True.
However, Background is not a member of the SystemColors class, and it
is not a member of the KnownColors enum nor the Color structure.
Where can I find this named colour? I want to be able to enumerate all named colours programmatically, but I cannot find this one (and one or two others).
TIA
Charles
Hi Richard
I have just looked at System.Drawing.SystemColors, but it does not appear to
contain a member "Background" on my m/c. Does it on yours? I am using VS2003
on Win2k SP4.
Charles
"Richard Burte" <rb****@online.microsoft.com> wrote in message
news:ex**************@tk2msftngp13.phx.gbl... There is a managed collection that returns this information - System.Drawing.SystemColors
"Charles Law" <bl**@thingummy.com> wrote in message news:uI**************@TK2MSFTNGP10.phx.gbl... Thanks for the response Richard. I will have a look at the API.
Charles
"Richard Burte" <rb****@online.microsoft.com> wrote in message news:ek**************@tk2msftngp13.phx.gbl... Seems that the IsNamedColor is checking the name attribute, rather
than the enumeration. IsKnownColor will work correctly. The enumeration is documented at:
http://msdn.microsoft.com/library/de...classtopic.asp and as you noted doesn't contain the Window Background color. I am
going to forward this to the product team. As a work around you may want to use the Win32 API to investigate the system color palette.
Cheers,
Richard Burte "Charles Law" <bl**@thingummy.com> wrote in message news:#b*************@TK2MSFTNGP10.phx.gbl... > When displaying the Color Picker for a web page (in the VS IDE), Background > is listed on the System Colors tab. > > Also, > > Color.FromName("Background").IsNamedColor > > returns True. > > However, Background is not a member of the SystemColors class, and
it is not > a member of the KnownColors enum nor the Color structure. > > Where can I find this named colour? I want to be able to enumerate
all named > colours programmatically, but I cannot find this one (and one or two > others). > > TIA > > Charles > >
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Torbjørn Pettersen |
last post by:
I've got a table where I want some of the cells to use
a background image. The cells have variable height, so
I am using an image with a rather small height to fill up
the background of the cells,...
|
by: Charles Law |
last post by:
When displaying the Color Picker for a web page (in the VS IDE), Background
is listed on the System Colors tab.
Also,
Color.FromName("Background").IsNamedColor
returns True.
However,...
|
by: Just D. |
last post by:
Who knows what should we include into aspx file to show some image as a
background picture but only once at the top of the page? I don't want to add
the Image control because even if it uses a...
|
by: Maxwell2006 |
last post by:
Hi,
Using ASP.NET 2.0,
I have this tag in my asp page:
<td runat =server background="~/Images/Header2.gif"> </td>
The problem is when I run the page, the server side TD tag renders...
|
by: bulwark_jrm |
last post by:
I'm trying to duplicate functionality found in a Windows application
at one of my clients. Essentially, another programmer was able to
arrange a lot of search options into a single dialog box by...
| |
by: soulmach |
last post by:
Hello forum friends. I performed a search on this topic, but I couldn't find anything useful. I wasn't really sure what to search.
First I'll state what I am trying to do. I recently agreed to...
|
by: Miggiddy79 |
last post by:
Does any body know how to fix this.
I am trying to validate these html codes through the markup validation.
I have 5 error messages:
1) Line 114, Column 15: there is no attribute "BACKGROUND" ....
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
| |
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The...
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |