LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to copy image of a window by window title programatically?

I would like to be able to programmatically copy the image of a window that is one of several that are open by using the window title.  Once copied to the clipboard I would like to paste the image to a file.  Suggestions?  Some less elegant options such as just copying the active window would be considered.

Thanks,

Dennis U
0 Kudos
Message 1 of 4
(2,740 Views)

A couple of links which can help you.

Here you will find a collection of windows tools, which will also allow you to bring a window to the front by title.

Here you will find a VI which shows you how to "click" alt+printscreen to get the image into the clipboard.

Using the scripting (I think you have to register with LAVA to read that specific board) abilities you can use the GetClipboardImage method to get the image in LV picture format and save it to a file.

I will leave it up to you to put it all together.

___________________
Try to take over the world!
Message 2 of 4
(2,726 Views)
If the window you want to capture an image of is a LabVIEW front panel, the whole process is much easier. Here is a vi that will do that.

Chris
0 Kudos
Message 3 of 4
(2,719 Views)

Try G Toolbox SnapView at http://gtoolbox.yeah.net

Works for any window, not just LabVIEW front panel;

Goes to file directly, faster than get array of image data in LabVIEW (get array into LabVIEW is an option);

Support bmp, gif, tiff, png, and jpg.

George Zou
0 Kudos
Message 4 of 4
(2,703 Views)