SendMessage(Handle, WM_SETREDRAW, WPARAM(False), 0);
try
// Create controls
finally
// enable updates
SendMessage(Handle, WM_SETREDRAW, WPARAM(True), 0);
// Invalidate; Might required
end;
.Canvas.Lock;
is the way or something else?
If Not FormIsUpdating Then
BeginFormUpdate;
If FormIsUpdating Then
EndFormUpdate;
I'm using TForm.FormIsUpdating/TForm.BeginFormUpdate/TForm.EndFormUpdate
TForm1 = class(TForm)
private
{ private declarations }
public
Procedure MyBeginFormUpdate;
Procedure MyEndFormUpdate;
Function MyFormIsUpdating: Boolean;
end;
implementation
procedure TForm1.MyBeginFormUpdate;
begin
BeginFormUpdate;
end;
procedure TForm1.MyEndFormUpdate;
begin
EndFormUpdate;
end;
function TForm1.MyFormIsUpdating: Boolean;
begin
Result := FormIsUpdating;
end;
.Canvas.Lock;