procedure TForm1.FormPaint(Sender: TObject);
var
i:Integer;
C1,C2:TColor;
f:Single;
begin
C1:=clBlue;
C2:=clGreen;
with Form1.Canvasdo
for i:=0 to ClientHeightdo
begin
f:=i/ClientHeight;
Pen.Color:=rgb(Round(GetRValue(C1)*f+GetRValue(C2)*(1-f)),
Round(GetGValue(C1)*f+GetGValue(C2)*(1-f)),
Round(GetBValue(C1)*f+GetBValue(C2)*(1-f)));
MoveTo(0,i);
LineTo(ClientWidth,i);
end;
end;