How to Create a Gradient Form

Posted December 15th @ 9:13 pm by m3Rlin

In setup programs or sometimes in AboutBoxes you can find gradient forms.
It sure looks as if it were a lot of work but it’s really very easy. All you have to do is add this code to your program.
This example will create a gradient rectangle on the whole form Canvas. To change it’s size just [...]

How to Convert TColor to a Hex String and Vice Versa

Posted December 15th @ 9:12 pm by m3Rlin

Delphi uses TColor to represent colors but HTML requires a string name (139 colors have names in the web palette) or a hex number. Here’s the code to convert a TColor color value to hex a string and vise versa.
The functions use the Windows API GetRValue(), GetBValue(), GetGValue() and RGB() functions.
!Note: If your are going [...]

« Previous EntriesNext Entries »