LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Save an graphical image of a running application

Hi community,

 

An application constantly runs on a PC. I need to periodically capture its window and save it to a disk, similarly as if I would select the window of the application and hit ALT+Printscreen. The trick is that the application is not necessarily visible as the operator can minizmize it to the tray or another application can overlay its window. Its size and position can change as well.

 

Is there way to do this with labview?

 

thanks.

0 Kudos
Message 1 of 15
(4,106 Views)

For sure there are many ways to do this.

 

Maybe a fully LabVIEW way with the CCT, never tried though, not sure it's going to work in EXE.

 

Certainly a "windows way" with dlls and getting the data from the clipboard, sounds like a lot of work to me.

 

Because it just work with very little coding, I install IrfanView along with my EXE and whenever I need a screenshot I launch a cmd : 

 

2016-02-09_115149.jpg


We have two ears and one mouth so that we can listen twice as much as we speak.

Epictetus

Antoine Chalons

0 Kudos
Message 2 of 15
(4,097 Views)

I can take screenshots in numerous ways even w/o irfanview, but as the app is not always visible on the desktop or could be (partially) covered by other windows simply taking screenshot doesnt solve my problem. Also I dont need a full screenshot. Having the entire deskop on the image is very undesirable.

 

 

See my original post:
"...similarly as if I would select the window of the application and hit ALT+Printscreen. The trick is that the application is not necessarily visible as the operator can minizmize it to the tray or another application can overlay its window. Its size and position can change as well."

0 Kudos
Message 3 of 15
(4,086 Views)

Oh... then I would look into the CCT


We have two ears and one mouth so that we can listen twice as much as we speak.

Epictetus

Antoine Chalons

0 Kudos
Message 4 of 15
(4,073 Views)

What the CCT does is to call the FP.Get Image method on the VI, which returns an image of the FP, which you can then save to a file. I believe this should work in an EXE (assuming the FP wasn't removed, which it wouldn't be if you use it as a window), and should probably also work if the FP is not visible, but I'm not sure if the FP updates correctly if it is minimized. You will need to test that.


___________________
Try to take over the world!
0 Kudos
Message 5 of 15
(4,071 Views)

use this method put it inside the case structure and start programing to execute in particular time 

you just need to adjust the picture size same as your ROI to capture too 

0 Kudos
Message 6 of 15
(4,054 Views)

Unfortunately, its not a LabVIEW exe, its a 3rd party application.

0 Kudos
Message 7 of 15
(4,032 Views)

Oh... And you want to make a LabVIEW app to get screenshots of this 3rd party app periodically?

 

Then it make it a little more difficult... I guess you can use Windows dlls to retrieve the Window Handle of the app but then I don't know how to get a screenshot of it 😮

Maybe .NET lets you do that I have no idea. Can't help more than this.

Good luck


We have two ears and one mouth so that we can listen twice as much as we speak.

Epictetus

Antoine Chalons

Message 8 of 15
(4,027 Views)

Yeap, thats correct. I bet there is a way to automate this, but as you said... most likely it will be .net or dll calls.

0 Kudos
Message 9 of 15
(4,021 Views)

so you means is this not capture front panel see this page it will be help you 

Programmatically Acquire a Screen Capture in LabVIEW

 

0 Kudos
Message 10 of 15
(4,009 Views)