06-11-2017 11:10 AM - edited 06-11-2017 11:15 AM
What makes this a mistake, how can I fix it?
Last week it was still good!
Error:
Error 1172 occurred at Invoke Node System.Reflaction.TargetInvocationException
Inner Exception:
System.InvaidOperationException
06-11-2017 02:35 PM
That is the general .NET exception handler error code wrapper. Unfortunately I don't understand the error message in your native tongue. Would you be able to translate this? Either way the error indicates that an exception occurred trying to perform that Invoke node call - it looks like you are trying to make a call into the Windows Presentation Foundation framework (see here). Most likely the exception is thrown since the UI loop is controlled through LabVIEW and not the framework (ie see "STA" mentioned there, most likely indicating a different threading apartment model then LabVIEW).
There are other ways to achieve this in LabVIEW - you can use an event structure to monitor for a key press and then determine if it is the key you wanted (or some other).
06-11-2017 02:42 PM
I was able to reproduce your error on my machine. It is complaining about STA (Single-threaded Apartment) since there are other UI resources competing for your key-press events.
Why not monitor key-presses via Event structure?