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 Stretch an Icon

Posted December 15th @ 9:09 pm by m3Rlin

Although Delphi’s StretchDraw() function should work for icons it doesn’t The way to get round this is to use the Windows API DrawIconEx() function.

(* iNewWidth - (Integer) New icon width
** iNewHeight - (Integer) New icon height
*)
DrawIconEx(Canvas.Handle, 0, 0, Icon.Handle, iNewWidth, iNewHeight, 0, 0, DI_NORMAL);

Bookmark It

Hide Sites

« Previous Entries