Capture Screen area - Repaint low lazarus / 39-Graphics ---------------------------------------------------------------------- laguna · 2018-05-09 06:50 Hi, help me, In this program, capture area screen, with mouse, refresh low e repaint  is bad. without the repaint, capture area screen is correct, but not display rectangle area, with mouse. Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i procedure TfrmScreenShot.FormMouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer);begin  if FMakingSelection then begin    FSelectionRect.Right:=X;    FSelectionRect.Bottom:=Y;    Repaint;      //  <---------------------------  end;end; procedure TfrmScreenShot.FormMouseUp(Sender: TObject; Button: TMouseButton;  Shift: TShiftState; X, Y: Integer);begin  if FMakingSelection then begin    FMakingSelection:=False;    FSelectionMade:=True;    Repaint;  //  <---------------------------    SaveSelectedRegion;    Close;  end;end;   Help me for optimize this. Thanks. Vincenzo ---------------------------------------------------------------------- Thaddy · 2018-05-09 06:57 form.beginupdate/endupdate would help. ---------------------------------------------------------------------- laguna · 2018-05-09 07:10 I do not understand how to use it, can you help me? Thank you Vincenzo ---------------------------------------------------------------------- balazsszekely · 2018-05-09 09:41 You should really switch to something more performant like BGRABitmap or something similar. Until then try the attached project(tested only on windows). ---------------------------------------------------------------------- laguna · 2018-05-09 11:36 Run very well.  Thanks.