BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Changing Delphi Color Constant ?

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Graphics
View previous topic :: View next topic  
Author Message
Jo Black
Guest





PostPosted: Sun Apr 29, 2007 1:42 pm    Post subject: Changing Delphi Color Constant ? Reply with 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 !!!

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





PostPosted: Sun Apr 29, 2007 7:48 pm    Post subject: Re: Changing Delphi Color Constant ? Reply with quote



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





PostPosted: Sun Apr 29, 2007 9:48 pm    Post subject: Re: Changing Delphi Color Constant ? Reply with quote



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





PostPosted: Fri May 04, 2007 1:37 pm    Post subject: Re: Changing Delphi Color Constant ? Reply with 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
G.W. van der Vegt
Guest





PostPosted: Fri May 04, 2007 1:51 pm    Post subject: Re: Changing Delphi Color Constant ? Reply with quote

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
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Graphics All times are GMT
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.