Search results for 'Screen Shot'. 1 post(s) found.

  1. 2007/09/11 How to capture Windows Desktop to Bitmap
2007/09/11 07:43

How to capture Windows Desktop to Bitmap


Here's a piece of Delphi code capable of capturing the Windows Desktop image into a TBitmap object:

procedure ScreenShot(DestBitmap : TBitmap) ;
var
  DC : HDC;
begin
  DC := GetDC (GetDesktopWindow) ;
  try
  DestBitmap.Width := GetDeviceCaps (DC, HORZRES) ;
  DestBitmap.Height := GetDeviceCaps (DC, VERTRES) ;
  BitBlt(DestBitmap.Canvas.Handle,
         0,
         0,
         DestBitmap.Width,
         DestBitmap.Height,
         DC,
         0,
         0,
         SRCCOPY) ;
  finally
  ReleaseDC (GetDesktopWindow, DC) ;
  end;
end;
Trackback 4 Comment 0

Trackback : Cannot send a trackbact to this post.

  1. Subject different money making ideas

    Tracked from moneyideas 2010/01/25 08:59 delete

    moneyideas

  2. Subject different money making ideas

    Tracked from moneyideas 2010/01/28 22:17 delete

    moneyideas

  3. Subject different money making ideas

    Tracked from moneyideas 2010/01/29 06:38 delete

    moneyideas

  4. Subject different money making ideas

    Tracked from moneyideas 2010/01/31 16:39 delete

    moneyideas