 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Jo Black Guest
|
Posted: Sun Apr 29, 2007 1:42 pm Post subject: Changing Delphi Color Constant ? |
|
|
Hi to all
how can i change the value of the Delphi graphic color constants
(clBtnShadow,clBtnFace,....).
i saw a compnent in the old version of the jvcl (i think in v2) that let
to change all the value of all constants but this one is moved from the
new versions !!!
anu one please can give me a solution or a link to a compenent similar
to the old jvcl one ?
thanks |
|
| Back to top |
|
 |
Peter Below (TeamB) Guest
|
Posted: Sun Apr 29, 2007 7:48 pm Post subject: Re: Changing Delphi Color Constant ? |
|
|
Jo Black wrote:
| Quote: | Hi to all
how can i change the value of the Delphi graphic color constants
(clBtnShadow,clBtnFace,....). i saw a compnent in the old version of
the jvcl (i think in v2) that let to change all the value of all
constants but this one is moved from the new versions !!!
|
These specific constants map to system colors, so the user can change
them in the display settings dialog if themes are not enabled. You
should not try to modify these colors at compile-time, that makes no
sense. And they are not yours to change at run-time either, since any
such change does not only affect your application but all of them. See
SetSysColors in the MS platform SDK docs.
--
Peter Below (TeamB)
Don't be a vampire (http://slash7.com/pages/vampires),
use the newsgroup archives :
http://www.tamaracka.com/search.htm
http://groups.google.com |
|
| Back to top |
|
 |
Jo Black Guest
|
Posted: Sun Apr 29, 2007 9:48 pm Post subject: Re: Changing Delphi Color Constant ? |
|
|
Peter Below (TeamB) a écrit :
| Quote: | Jo Black wrote:
Hi to all
how can i change the value of the Delphi graphic color constants
(clBtnShadow,clBtnFace,....). i saw a compnent in the old version of
the jvcl (i think in v2) that let to change all the value of all
constants but this one is moved from the new versions !!!
These specific constants map to system colors, so the user can change
them in the display settings dialog if themes are not enabled. You
should not try to modify these colors at compile-time, that makes no
sense. And they are not yours to change at run-time either, since any
such change does not only affect your application but all of them. See
SetSysColors in the MS platform SDK docs.
|
Thanks Peter, it works well |
|
| Back to top |
|
 |
G.W. van der Vegt Guest
|
Posted: Fri May 04, 2007 1:37 pm Post subject: Re: Changing Delphi Color Constant ? |
|
|
Hi,
Bit related question, does anyone how to convert a color like clWindow color
to it's RGB values? I have some components that only accept RGB values but I
want them to match the form color for instance at application startup.
-----
Wim van der Vegt |
|
| Back to top |
|
 |
G.W. van der Vegt Guest
|
Posted: Fri May 04, 2007 1:51 pm Post subject: Re: Changing Delphi Color Constant ? |
|
|
Hi,
Found it!
ColorToRGB accepts both 'normal' and 'system' colors and returns RGB values.
-----
Wim van der Vegt
"G.W. van der Vegt" <wim.vandervegt (AT) ou (DOT) nl> wrote in message
news:463af0e8 (AT) newsgroups (DOT) borland.com...
| Quote: | Hi,
Bit related question, does anyone how to convert a color like clWindow
color to it's RGB values? I have some components that only accept RGB
values but I want them to match the form color for instance at application
startup.
-----
Wim van der Vegt
|
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|