To download NI software, including the products shown below, visit ni.com/downloads.
Overview
This example demonstrates how to arrange the Front Panel of the Target VI on the right top of the Reference VI.
Description
The VI opens the Front Panel of the Target VI and the Reference VI. It calculated the Front Panel bounds of the Target VI, if it is located to the right top of the Reference VI. If the resolution of the monitor is to small, it throw a warning, else the Front Panel bounds are applied using Property Nodes.
Software
Hardware
Steps to Implement or Execute Code
Additional Information or References
**The code for this example has been edited to meet the new Community Example Style Guidelines. The edited copy is marked with the text ‘NIVerified’. Read here for more information about the new Example Guidelines and Community Platform.**
Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.
Hey Mark. As always nice clean code with good comments.
Dick
Nice tool.
There is one catch with it; if the target VI is closed and does not open itself when run getting its window bounds will fail (as there is no window yet). So the first thing it should do is to open the window of the target in the state "Hidden", then it can get the window bounds.
It would be nice to add functionality to match the height and/or width of the reference VI, check if there is actually room on the display to show the target in its intended position (and then default to a center position e.g. if not), and be able to ignore the operation if the VI happens to already be open and running.