LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I take a complete screenshot, including title bar, of a given VI?

I'm trying to automatically generate some documentation, which includes all possible alarms that the system generates through a central alarm manager.

 

I've managed to build a working setup that uses the "FP.Get Image" invoke node, combined with the "Write PNG File" vi from the Graphics Formats Palette.

 

This is great, but it's missing the title bar in all of the screenshots. Since the alarm VI is the same for all, I could manually stitch on a title bar with icon using another tool, but if there's a Native G way to do this, that would be great.

 

Previous discussions have dead links or dismissive posters:

 

https://forums.ni.com/t5/LabVIEW/I-m-trying-to-access-Window-Handle-HWND-in-Labview-This-is-an/td-p/...

 

https://forums.ni.com/t5/LabVIEW/Get-Windows-Handle-hWnd-of-a-SubPanel-VI/td-p/1880023

 

 

0 Kudos
Message 1 of 6
(1,495 Views)

Here's some screenshots of the code that I have, to give you an idea about how it's done:

 

Taking screenshots:

ijustlovemath_0-1667857535758.png

 

Faking alarms by building test cases that trigger them from alarm's originators:

 

ijustlovemath_1-1667857666331.png

 

The two happen in parallel, as alarms are actually spawned through a QMH (not pictured)

 

 

I can't include snippets since there's too many dependencies, but it's pretty small!

0 Kudos
Message 2 of 6
(1,493 Views)

I don't have time to try to create something functional, but perhaps you could find a way to do the windows equivalent of "Alt+Printscreen", which takes a screenshot of the currently selected window and puts it in the clipboard, then use Windows system DLLs or .NET nodes to get or save the picture data in the clipboard.  Then all you would need to do is make sure this window is active and foremost when you need the screenshot.

0 Kudos
Message 3 of 6
(1,442 Views)

You can try something like this: https://forums.ni.com/t5/Example-Code/Continuous-Screen-Capture-in-LabVIEW/ta-p/3518680

 

You can use the VI's Window Bounds property to set the size of the bitmap and the sourceX/Y params, which should capture just the window.


___________________
Try to take over the world!
0 Kudos
Message 4 of 6
(1,411 Views)

I, personally, use Snagit.  My colleagues like the Windows "Snipping Tool".

 

Bob Schor

0 Kudos
Message 5 of 6
(1,386 Views)

And then there is also GreenShot. Our IT department seems to install that standard with the system image. Works ok and has many features that I mostly not use. 🙂

Rolf Kalbermatter
My Blog
0 Kudos
Message 6 of 6
(1,359 Views)