Front Panel
| |
This page is under construction. This page or section is currently in the middle of an expansion or major revamping. However, you are welcome to assist in its construction by editing it as well. Please view the edit history should you wish to contact the person who placed this template. If this article has not been edited in several days please remove this template. Please don't delete this page unless the page hasn't been edited in several days. While actively editing, consider adding {{inuse}} to reduce edit conflicts. |
The Front Panel of a VI contains the User Interface of the VI. The front panel can be simple with only a few inputs, (controls) and outputs (indicators) for a SubVI or complex with many controls, indicators, and decoration for an application interface. The Controls Palette or Quick Drop is used to select the type of control, indicator, or decoration to add to the front panel. By default the size and position of the front panel will dictate its running size and position
Creating a Front Panel
Adding Controls/Indicators
Via Controls Palette
|
|
Via Quick Drop
|
|
Organization Best Practices
For simple VIs, it is best practice to place inputs (controls) on the left side of the front panel and outputs (indicators) on the right side of the front panel in a manner that matches their position on the Connector Pane.
For complex UIs see the page on User Interfaces.
Advanced
Properties
Front panel properties and be accessed via a panel refnum and a Property Node using the VI Server. See Panel Properties.
Methods
Front panel methods and be accessed via a panel refnum and an Invoke Node using the VI Server. See Panel Methods.
Minimize a caller VI while a subVI is running.
If you would like to minimize the caller VI, for example if you have a main VI that does essentially nothing while the subVI that it calls is executing, you need to reference your calling VI. So upon calling your subVI the first action would be to open a reference to your calling VI and size its front panel appropriately by using the VI Property Node. Then when exiting the subVI after completing execution you can restore the calling VI's front panel to its original size and close the reference.
Under Windows 98/2000 you can effect the above behavior with a couple of simple calls to the user32.dll API. First you get a handle to the window of the calling VI (or other Window) and then call either:
ShowWindow()
or
AnimateWindow()
The info on making the calls can be found for free at Microsoft at:
http://msdn.microsoft.com/library/default..../ShowWindow.asp
or by going to http://msdn.microsoft.com and search on ShowWindow or AnimateWindow.
