Screen Capture Without Lazarus App Showing in Screen Capture lazarus / 39-Graphics ---------------------------------------------------------------------- Possum · 2020-08-19 00:41 Hi I really have looked hi and low but no answer found so here I am. I want to do a screen capture that does not include my Lazarus (linux) app.. But the app keeps on getting included in image... 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 TForm1.Button1Click(Sender: TObject);varScreenDC: HDC;MyRec : TRect;LocalBitmap : Tbitmap;begin  form1.Visible:=false;  LocalBitmap := TBitmap.Create;  ScreenDC := GetDC(1);  LocalBitmap.LoadFromDevice(ScreenDC);  LocalBitmap.SaveToFile('/home/mpskinner/Desktop/zz.bmp');  LocalBitmap.free;  form1.Visible:=true;  ReleaseDC( 0, ScreenDC );end;   I'm lost. Any pointers appreciated.. Thank You.. ---------------------------------------------------------------------- dsiders · 2020-08-19 00:49 https://wiki.lazarus.freepascal.org/Developing_with_Graphics#Taking_a_ screenshot_of_the_screen ---------------------------------------------------------------------- Possum · 2020-08-19 01:02 That's the code I am using. Even though I make the form invisible it still gets included in the bitmap.. Thank You.. ---------------------------------------------------------------------- Jurassic Pork · 2020-08-19 01:06 hello, try this : 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 form1.Visible:=false;  Application.ProcessMessages;    Sleep(2000);  LocalBitmap := TBitmap.Create;     Friendly, J.P ---------------------------------------------------------------------- Possum · 2020-08-19 01:16 Thank You.... Solved