To download NI software, including the products shown below, visit ni.com/downloads.
Overview
This VI will take in a reference for the VI it is being called by and then output information about the position of; the VI front panel, the mouse in repect to the screen and the mouse in respect to the front panel.
Description
Want to know where your Front Panel is positioned or what co-ordinates your mouse cursor is at? This VI finds the position of your Front Panel, the position of your mouse in respect to the desktop and the position of your mouse in respect to your front panel. It is designed to be used as a subVI in one of your programs, taking in a reference to the VI that is calling it and outputting all the values mentioned above as 32bit integers.
Requirements
Steps to Implement or Execute Code
Additional Information or References
VI Snippet
**This document has been updated to meet the current required format for the NI Code Exchange.**
Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.
Is there any possibilities to detect if mouse (cursor) is on 1st screen (Primary monitor) or Secondary monitor.
MFG
Kumar
I don't have a second monitor so I can't test this idea myself BUT you might be able to check the mouse position and compare it to the results from the Primary Workspace Property (http://zone.ni.com/reference/en-XX/help/371361J-01/lvprop/app_dsplyprim_wrkspc/) to see if it falls within this boundary, if it does then the mouse is on the primary monitor if not then it must be on the secondary monitor. This is just my initial thinking, and there is probably a better way to do it, but I would think that this could work.