Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Multimedia (https://www.delphipraxis.net/16-multimedia/)
-   -   Delphi Screenshot an einer bestimmten Stelle (https://www.delphipraxis.net/30733-screenshot-einer-bestimmten-stelle.html)

-NIP- 28. Sep 2004 17:03


Screenshot an einer bestimmten Stelle
 
Hi!

Ich habe ein Problem. Und zwar :lol: habe ich schon überall gesucht, aber
nur gefunden, wie man einen Screenshot macht. Ich will aber einen bestimmt großen Screenshot an einer bestimmten Stelle des
Bildschirms machen.
Bitte helft mir!
(Vielleicht hab ich nicht gut genug gesucht :roll: )

-NIP-

Steve 28. Sep 2004 17:13

Re: Screenshot an einer bestimmten Stelle
 
Delphi-Quellcode:
Procedure GetScreenshot(aRect: TRect);
var
  Desktop: HDC;
  bmp   : TBitmap;
begin
  Result := TBitmap.Create;
  Desktop := GetDC(0);
  try
    bmp.PixelFormat := pf32bit;
    bmp.Width      := aRect.Right-aRect.Left;
    bmp.Height     := aRect.Bottom-aRect.Top;
    BitBlt(bmp.Canvas.Handle, 0, 0, bmp.Width, bmp.Height, Desktop, aRect.Left, aRect.Top, SRCCOPY);
    Result.Modified := True;
  finally
    ReleaseDC(0, Desktop);
    FreeAndNil(bmp);
  end;
end;
.. in Anlehnung an http://www.swissdelphicenter.ch/de/showcode.php?id=140 :zwinker:

Gruß
Stephan

-NIP- 28. Sep 2004 17:19

Re: Screenshot an einer bestimmten Stelle
 
Danke schonmal! :thumb:
Gibt es denn auch eine Möglichkeit eine Paintbox komplett
in einem Image anzeigen zu Lassen? :-D

-NIP-

moritz 28. Sep 2004 17:24

Re: Screenshot an einer bestimmten Stelle
 
Was?

-NIP- 28. Sep 2004 17:39

Re: Screenshot an einer bestimmten Stelle
 
Na den Inhalt einer PaintBox, wenn da schon was drauf gezeichnet wurde etc.
Das will ich in einem Image anzeigen lassen.

-NIP-

fkerber 28. Sep 2004 17:39

Re: Screenshot an einer bestimmten Stelle
 
Hi!

Schau mal nach

Delphi-Referenz durchsuchenBitBlt

Ciao Frederic

-NIP- 28. Sep 2004 17:47

Re: Screenshot an einer bestimmten Stelle
 
Sorry in der Delphi Hilfe finde ich da nichts. Und auch im Internet bisher
nichts Gescheites. :duck:

-NIP-

moritz 28. Sep 2004 17:50

Re: Screenshot an einer bestimmten Stelle
 
Erstes Ergebniss der Google-Suche: http://msdn.microsoft.com/library/de...tmaps_0fzo.asp


Alle Zeitangaben in WEZ +1. Es ist jetzt 03:38 Uhr.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz