10-10-2008 10:11 AM
Chief LabVIEW Architect, Testeract | Owner, Q Software Innovations, LLC (QSI)
Director, GCentral | Admin, LabVIEW Wiki | Creator, The QControl Toolkit
Certified LabVIEW Architect | LabVIEW Champion | NI Alliance Partner
Solved! Go to Solution.
10-10-2008 10:22 AM
Q,
there is, at least to my knowledge, not such function directly available in LabVIEW. The event structure for instance only supplies you with events which are created within the LabVIEW window.
What LabVIEW is doing in the background is simplified to this:
The Operating System (OS) detects an interaction of an HMI-device (like the mouse) and queues this event in the event-queue. LabVIEW looks into this queue and fetches all events which are connected with LabVIEW windows. Most (but not all) of those events are available in the event structure. If LabVIEW finished processing that given event, it is usually 'requeued' in the windows event queue. Afterwords, Windows processes that event and deletes it.
The event you want to track is not meant for any LabVIEW window and therefore will not be available in LabVIEW using the standard mechanics. But still, you can use the API from the OS in order to get infos about that. For Windows, that API is called "Windows Software Developement Kit" or shortended: Windows SDK. The SDK consists of many DLLs which can be used in any programming language. So you can use the SDK to
- get info if a mouseclick occured
- if a mouseclick occured you can check if it occured inside or outside of a LabVIEW window.
But that will definetly create a lot of overhead in you application and maybe therefore create performance issues.....
hope this helps,
Norbert
10-10-2008 12:24 PM - edited 10-10-2008 12:25 PM
If you aren't family with Window API/SDK. G Toolbox can have you to capture the the mouse click event outside LabVIEW window (using Window API).
If you don't mind poll, there is an easy approach (see attached image):

10-10-2008 01:21 PM
Some other ideas that may/or may not work...:
10-10-2008 01:28 PM
Thanks zou,
I just compared axis info to my panel location. When a mouse button was clicked and the click was outside the panel, the exit state would be triggered. One small problem is a click inside the panel, when dragged outside of it is still considered a click out side the panel. I might be able to compensate for this by using different events.
Also, thanks to Altenbach
Chief LabVIEW Architect, Testeract | Owner, Q Software Innovations, LLC (QSI)
Director, GCentral | Admin, LabVIEW Wiki | Creator, The QControl Toolkit
Certified LabVIEW Architect | LabVIEW Champion | NI Alliance Partner