PDA

Click to See Complete Forum and Search --> : [Delphi 7] - Gradient Form


Madboy
Jun 6th, 2004, 10:01 AM
procedure TForm1.FormPaint(Sender: TObject);
var
Row, Ht: Word ;
begin
Ht := (ClientHeight + 255) div 256 ;
for Row := 0 to 255 do
with Canvas do begin
Brush.Color := RGB(Row, 0{Row}, {Row}0) ;
FillRect(Rect(0, Row * Ht, ClientWidth, (Row + 1) * Ht)) ;
end ;
end;

Madboy
Jun 4th, 2005, 07:53 AM
How do you change the gradient colour?

I have tried modifying all the values in the code! :blush: