Recent

Author Topic: How do I capture a screen image behind a window  (Read 661 times)

myisjwj

  • Jr. Member
  • **
  • Posts: 70
How do I capture a screen image behind a window
« on: May 28, 2024, 03:27:00 am »
There is an TImage in the window, and in the front, how to capture the screen image behind the window.

KodeZwerg

  • Hero Member
  • *****
  • Posts: 2269
  • Fifty shades of code.
    • Delphi & FreePascal
Re: How do I capture a screen image behind a window
« Reply #1 on: May 28, 2024, 04:22:30 am »
The provided information is very poor explained.
anyway:
1. Hide Window(s)
2. Capture area
3. Show Window(s)
« Last Edit: Tomorrow at 31:76:97 xm by KodeZwerg »

440bx

  • Hero Member
  • *****
  • Posts: 4212
Re: How do I capture a screen image behind a window
« Reply #2 on: May 28, 2024, 12:04:21 pm »
There is an TImage in the window, and in the front, how to capture the screen image behind the window.
Have a look at this https://www.codeproject.com/Articles/20651/Capturing-Minimized-Window-A-Kid-s-Trick

you can capture the entire client area of a partially covered window, you can even capture the entire client area of a minimized window. Of course, it's C code but, it's fairly simple and it wouldn't take much to port it to FPC.

Enjoy!
(FPC v3.0.4 and Lazarus 1.8.2) or (FPC v3.2.2 and Lazarus v3.2) on Windows 7 SP1 64bit.

jamie

  • Hero Member
  • *****
  • Posts: 6293
The only true wisdom is knowing you know nothing

 

TinyPortal © 2005-2018