2008. május 20., kedd

Storing color values in the registry/INI files


Problem/Question/Abstract:

Storing color values in the registry/INI files

Answer:

The GraphicsUnit has two useful functions:

StringToColor and ColorToString.

StringToColor will receive one of the valid 37 colors (such as clWhite) or a number (as a string) representing the color and return a TColor for it.

ColorToString will do the reverse.

Nice if you want to store colors as a name instead of a number.

Nincsenek megjegyzések:

Megjegyzés küldése