Einzelnen Beitrag anzeigen

Benutzerbild von Jelly
Jelly

Registriert seit: 11. Apr 2003
Ort: Moestroff (Luxemburg)
3.741 Beiträge
 
Delphi 2007 Professional
 
#7

Re: Sreenshot vom aktuellen Fenster?

  Alt 1. Apr 2007, 13:27
Probiers mal so:

Delphi-Quellcode:
procedure WindowShot (var B : TBitmap) ;
var
  H : THandle ;
  R, RClient : TRect ;

begin
  H := GetActiveWindow ;

  if H <> 0 then begin
      GetWindowRect (H,R) ;
      B.Width := R.Right-R.Left ;
      B.Height := R.Bottom-R.Top ;
      BitBlt(B.Canvas.handle, 0,0 , B.Width, B.Height, GetDc(0), R.left, R.Top, SRCCOPY);
  end ;
end ;
  Mit Zitat antworten Zitat