You are right about the word being the problem. A word can only store
0..65535 being only 16bit. If you were in 32bit color mode you would no
doubt encounter problems trying to stick a 32bit value into a 16bit
variable. Using a longint should work.
If you look up 'TColor' in the delphi help it also talks about how to
manipulate the color as a hexadecimal value like what you were doing
resulting in yellow.
Nahum Wild
CSG Software Developer
Swichtec Power Systems
-----Original Message-----
From: Coulter, Jeremy [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, 19 October 1999 14:12
To: Multiple recipients of list delphi
Subject: [DUG]: Colour Problem
Hi all.....well now I have established the list IS still
working......lastnight I was doing some stuff with colours
I found that if I tried to set a variable with clWhite, I got a constant out
of range error.
The variable is of type WORD, dould I change this to longint instead ??
Also, if I set the colour and saved it to the variable with $FFFF (I think
it was) it always defaulted to Yellow !
BUt is my suspission about using a longint rather than a word founded ??
Thanks,
Jeremy Coulter
Application Developer
Application Development Centre
Compaq Computer New Zealand Ltd.
Phone: 64 3 371 5724
Fax: 64 3 371 5724
Mobile: 64 0212533214
E-mail: [EMAIL PROTECTED]
Personal Email: [EMAIL PROTECTED]
---------------------------------------------------------------------------
New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
Website: http://www.delphi.org.nz
---------------------------------------------------------------------------
New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
Website: http://www.delphi.org.nz