Unfortunately i not understood your custom
DoubleBuffer function.
Probably this can work to remove flicker when Form is resized in
TakeScreenshot method, but i'm totally lost about how implement on my code

Delphi-Quellcode:
if DoSnapShot then
begin
DoSnapShot := False;
DesktopHwnd := GetDesktopWindow;
DesktopDC := GetDC(DesktopHwnd);
DesktopCanvas := DoubleBuffer(Canvas.Handle, ScreenRect.Right, ScreenRect.Bottom, CreateBuffer);
BitBlt(DesktopCanvas, 0, 0, ScreenRect.Right, ScreenRect.Bottom, DesktopDC, 0, 0, SRCCOPY);
DoubleBuffer(0, 0, 0, DestroyBuffer);
ReleaseDc(DesktopHwnd, DesktopDC);
end;
check this works by me..
EDIT:
Your problem is not the flickering but the setting of the height and width to 0
and then back to the old Position (Fullscreen)
Rethink your approach
using.. "Hide, Show" or "minimize, maximize" or create a Container for the Capture.
just a Suggestion.
greets