06-18-2020 02:36 AM
Hi,
for an application I need to acquire timed screenshot. I wrote a VI based on the example that I found at this link: https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z0000019NdrSAE&l=it-IT the VI is attacched in this post.
The problem is that I have success in triggering the event keybd_event so I have the image in the clipboard (if I copy the image in paint the screenshot is acquired correctly) but when I call the Invoke Node Clipboard->GetImage this returns an empty reference and so I have an error in saving file. It seems that clipboard is empty but it is not true.
Someone could help me? Why do I have this behavior?
Thank you very much.
Solved! Go to Solution.
06-18-2020 12:42 PM
I think the dll and the .NET calls have to run in the UI thread. Go to the VI properties -> Execution and change "Preferred Execution System" to "User Interface"
06-19-2020 02:40 AM
It works! Thank you very much for your feedback!