O.K. If I put a TImage on the TForm, the following code works fine:
procedure TForm1.Button4Click(Sender: TObject);
var i: integer;
begin
With Image3 do
begin
DoubleBuffered:=True;
Canvas.Brush.Color:=clWhite;
Canvas.Pen.Color:=clRed;
Canvas.Fillrect(Rect(0,0,width,height));
Canvas.MoveTo(0, Height div 2);
for i:=0 to 6283 do
begin
Canvas.LineTo(Round(i*width/6283), Round((Height div 2)*(1+SIN(i/1000))));
if ((i mod 10)=0) then begin Application.ProcessMessages; Repaint; end;
end;
end;
end;
But, if I put the TImage on a TTabSheet of a TPageControl, the image blinks - there are gray strips. Try it and you will see.
Epsilon