Board index » delphi » screen capture

screen capture

Does anybody know how to screen capture with delphi when mutiple images
are
displayed on the main form i want to capture all of these an save as a
bmp file#
                  Many Thanks
                        Gerald

 

Re:screen capture


Gerald Thomas ha scritto nel messaggio
<34FBDD7C.60BB6...@gwent.nhs.gov.uk>...

Quote
>Does anybody know how to screen capture with delphi when mutiple images
>are
>displayed on the main form i want to capture all of these an save as a
>bmp file#

I've done this routine to grab screen.
I hope it can help.

Bye Uberto

function CreateScreenBitmap: TBitmap;
  var
   DeskDC: HDC;//Ub
  begin
 DeskDC:=GetDC(GetDesktopWindow);//Ub
    try
      try
      result := TBitmap.Create;
      with result do
        begin
        PixelFormat := pf24bit;
        Width:=Screen.Width;
        Height:=Screen.Height;
        BitBlt(canvas.handle, 0, 0, Screen.Width, Screen.Height, DeskDC, 0,
0, SRCCOPY);//Ub
        end;
      except
      result := nil;
      end;
    finally
  ReleaseDC(GetDesktopWindow, DeskDC); //Ub
    end;
  end;

Other Threads