Recent

Author Topic: Show portion of several opened windows in a single window  (Read 400 times)

Marco343

  • Newbie
  • Posts: 4
Show portion of several opened windows in a single window
« on: March 23, 2019, 09:50:18 pm »
Hi, newbie here.
I need to code a small program (let's call it dashboard) that shows rectangular portions of several opened windows, in a single window. It will run on Windows 10. The idea is to open one single application (not done by me) several times (many, like 30) in a Windows 10 desktop (workspace) and then my app would run in another desktop (same computer, same windows 10), showing in a single window, all the 30 rectangular portions of the 30 opened windows, in a matrix like format, say 6 x 5.
I need help on that. Would any kind soul show me the way ?
And yes, the those portions of each window are updated regularly and my dashboard app also needs to reflect the update.
Thank you very much.

ASerge

  • Hero Member
  • *****
  • Posts: 1224
Re: Show portion of several opened windows in a single window
« Reply #1 on: March 24, 2019, 02:37:34 pm »
I need help on that. Would any kind soul show me the way ?
Find the needed apps first (through EnumDesktopWindows), copy the contents of these windows (using GetDC, BitBlt) to some bitmaps. Show bitmaps by the DrawGrid. Update bitmaps by timer.

Marco343

  • Newbie
  • Posts: 4
Re: Show portion of several opened windows in a single window
« Reply #2 on: April 05, 2019, 09:15:43 pm »
It worked.
- Start the external application with TProcess.Execute;
- Find the main window associated to the process with GetWindowThreadProcessId;
- Take screenshots with PrintWindow;
- Transfer a portion of the screenshots to the related TImage in the form with StretchBlt;
- Update the shots based on TTimer;

A lot of polishing still to go.
Thanks.
« Last Edit: April 11, 2019, 02:17:57 am by Marco343 »