I'm using LabView NXG 3.1.1 and I've noticed that when running a VI in a separate window instead of the editor, the window that opens up is enormous. I can manually resize it by going to the Panel tab and entering in my screen's resolution in the width and height boxes in the 'Canvas' section.
However, the program I'm working on will likely be run on multiple machines with potentially different screen resolutions. How do I ensure that when the program opens up in a separate window, the window will be the correct size every time?
There is a way to programmatically set the window size, but not to read the resolution of the new screens. Would that be sufficient?
So there is no way to get the resolution of the current screen?
In order to set the window size, it looks like it can be done by creating a panel reference and inserting a property node for the window size. Is that the right way to do it?
That's correct, that's how you would do that.
As for getting screen resolution, LabVIEW NXG doesn't support this natively. There may be some workarounds to get it, including using the VI Interop node to call into LabVIEW, but the best solution for you depends on many other factors.
You can programmatically resize the panel using both of the above suggestions. See the below images and the attached example project. You can use the .NET Interface to call the System.Windows.Forms assembly and use the Screen object per that other post.