To download NI software, including the products shown below, visit ni.com/downloads.
Overview
VI that programmatically takes a screenshot of the primary screen and save it to a desired path.
Description
This code will generate a picture of the primary screen and automatically save it to a desired path. The VI also will add to the name you want the format selected on the Enum in order to avoid inserting it manually.
It uses the Screen, Bitmap, Graphics, .NET classes, among others.
Requirements
LabVIEW 2012 (or compatible)
Steps to Implement or Execute Code
1. Choose the path to save the screenshot and select the name to save the file.
2. Choose the format you would like to save the screenshot in.
3. Run the VI.
Additional Information or References
Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.
Thanks ! Nice example ! Working !
Thanks, very helpful.
There is a memory leakage: Bitmaps and Graphics have to be disposed:
Same thing here: https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z0000019NdrSAE