Whenever I draw on the form/on a image or when I change the position of a element(eg. button) the form flashes briefly after which it shows properly. This bug occurs with all apps I made and I have yet to find a solution.
Anything from Button1.Left=100
to Form1.Canvas.Ellipse(10,10,40,40)
causes this effect to occur.
I assume this has to do something with the form recalculating what to show on it?
Example:
unit Unit1;
interface
uses
Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.ExtCtrls, Vcl.Imaging.GIFImg;
type
TForm1 = class(TForm)
Image1: TImage;
Timer1: TTimer;
procedure Timer1Timer(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.Timer1Timer(Sender: TObject);
begin
Image1.Left:=Image1.Left+1;
end;
end.
This is a simple example. When the image moves for a reason it flashes