To download NI software, including the products shown below, visit ni.com/downloads.
This example demonstrates how to set the background image of a Front Panel programmatically through VI Server.
Description
This example uses VI Server to programmatically set the background of a Front Panel to an image loaded from disk.
It converts a VI's file path to a reference to the VI using Open VI Reference. The reference to the VI enables you to access the panel of the VI. The panel itself provides programmatically access to all panes. The pane offers a BackgroundImage property node. The example loads an image and populates the image to the BackgroundImage property node.
Requirements
Software
Hardware
Steps to Implement or Execute Code
Additional Information or References
If you would like to apply the image to the background of the current VI's front panel, replace Open VI Reference with VI Server Reference available in the Application Control palette.
**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.