11-07-2022 03:44 PM
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/Get-Windows-Handle-hWnd-of-a-SubPanel-VI/td-p/1880023
11-07-2022 03:48 PM - edited 11-07-2022 03:50 PM
Here's some screenshots of the code that I have, to give you an idea about how it's done:
Taking screenshots:
Faking alarms by building test cases that trigger them from alarm's originators:
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!
11-07-2022 07:12 PM
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.
11-08-2022 02:07 AM
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.
11-08-2022 07:59 AM
I, personally, use Snagit. My colleagues like the Windows "Snipping Tool".
Bob Schor
11-09-2022 05:03 AM