Virus scan in progress. Please wait to download attachments.
This VI uses an Event Structure to discard mouse clicks and prank co-workers.
There are two types of events that the Event Structure can be configured to handle: Notify Events and Filter Events.
Notify events are the most common and only react to what has occurred on the front panel. In this example, a Key Press is a notify event. Any press of the keys on the keyboard will result in the Key Press Case executing. It looks to see which keys were pressed, and from this outputs either a true or false to stop the program. In this way we are able to create a keypress combination, CTRL+C, that will stop the Prank VI from running.
Filter events catch an event performed by the user before LabVIEW processes that event. In this example, a Mouse Click, or mouse down, is a filter event. When the program is running, any mouse clicks on the front panel will be registered before they are actually processed. This gives us the ability to discard them without having the clicks act on anything.
In the Edit Events window, notify events have green arrows while filter events have red arrows and end in ?'s signifying thier ability to be discarded.
LabVIEW 2012 (or compatible)
Steps to Implement or Execute Code
Download and open the VI on a co-worker's computer.
Expand the Front Panel until it covers the entire area of the Desktop, making sure that it overlaps the screen. Be sure that the Block Diagram Window and Context Help Windows are closed. You can even go so far as to hide the Desktop's Task Bar.
Run the VI. As the program runs, it will use a property node to become transparent.
Any mouse clicks made on the desktop will be registered by the event structure and discarded.
Press CRTL+C in order to exit execution of the program. Any other keypresses will be ignored.
Additional Information or References
Block Diagram of VI
For additional information over Event Programming or further examples of event structures in use, check out the links below.