06-14-2023 07:43 PM
Hello, please understand that I used Google Translate because I do not speak English.
I am planning to create automation for a simple task.
External program I want to create a program that loads the current image, compares it, and processes it, but I want to work in an inactive state.
I want to create a program that can do other tasks while running an automation program.
Is there a way to take an image of an external program in the minimized window state?
Solved! Go to Solution.
06-14-2023 08:11 PM
Not sure I completely understand what you mean, but LabVIEW can establish communication (over TCP/IP, for example) with another "cooperating" program, and can exchange information/data (again over TCP/IP). Reminds me of what happens with a LabVIEW Real-Time Project, where you have one LabVIEW program running on the Host (PC), another "stand-alone" LabVIEW program running on the Real-Time Target, and TCP/IP connecting the two, with communication between the two "relatively-independent" LabVIEW programs working in tandem.
Bob Schor
06-14-2023 08:28 PM
oh! I'm sorry.
I want to take images of other programs(not labviw) within the same pc.
I can use the print screen key, but I want to take an image and perform simple operations in the minimized window state.
Is there any way to access it?
06-14-2023 09:32 PM
Ah, you want to make a "Snipping Tool" with LabVIEW. Why? [I don't have any good ideas about how to accomplish this, hence the question "Why?"].
Bob Schor
06-15-2023 03:39 AM
As far as I understand your request, the only way this could be done is if the application in question offers some Inter-Application Communication channel (TCP/IP, pipe, ActiveX Server or similar) to request this image specifically.
A process can't look into another process randomly other than what this process provides explicitly as a service to access from other processes, preferably with some authentication too.
The only other way is if the process actually displays that image on screen as you can also capture the screen area as a bitmap (and in some convoluted ways as enhanced metafile too, but that is very tricky to do). And this requires interfacing to Windows GDI functions directly or use an application that you can control through a remote control interface which does that.
06-15-2023 07:38 PM
Thanks for the answer I was looking for, do you have any examples of accessing GDI?
06-15-2023 09:36 PM - edited 06-15-2023 09:37 PM
@ndtsystem wrote:
Thanks for the answer I was looking for, do you have any examples of accessing GDI?
Not really. Old Windows SDKs had such examples but they were programmed in C. And you likely don’t want to do that at all!
And it wouldn’t work to retrieve images from minimized windows!