I use default settings for my Image component.
Once I add code to mouseclick event of image component, the background color become black.
Why?
procedure Tf_main.Image1Click(Sender: TObject);
begin
Image1.Canvas.Pen.Color:=clRed;
Image1.Canvas.Line(1,1,800,600);
end;
With above code, when launching program, the background color of image1 is clWindows, once I click on it, it become black and draw a line in Red.
How could I do to prevent changing the background? Where does the black come?
Thank you.