Overview
This VI shows how to change a built executable's menu and menubar colors. This includes both backgrounds and foregrounds (font color). This is done by adding the relevant tokens in the executable's .ini file with the proper hexadecimal colors.
Description
By programmatically changing an executable's menu and menubar colors as well as the font color, you can adjust an application to match desired color schemes. This VI shows how to change a color box to a hexadecimal color string, which is then stored in the executable's .ini file (configuration file). This uses the following ini tokens (where ###### is a hexadecimal representation of a color):
menu.background = ######
menu.foreground = ######
menubar.background = ######
menubar.foreground = ######
Requirements
- LabVIEW 2013 (or compatible)
Steps to Implement or Execute Code
- Open the zip project and build the executable (make sure to specify a directory in the build properties). Open menu_color.exe.
- You can also open the attached executable menu_color.exe (LabVIEW 2013 only).
- Change the colors of the 4 color boxes on the executable's window. You can reset them to the default values by pressing the "Default" button.
- When ready, press the "GO" button. This will add the proper tokens to the executable's configuration file.
- Since the executable is already open, you need to close it in order to see the changes. By clicking "Stop", the application will close itself.
- Reopen menu_color.exe. Notice how the menu and menubar as well as their fonts have updated colors.
Additional Information or References
VI Block Diagram
(note: because of the nature of this VI, uploading a snippet is very impractical. You will need to download the attached files in order to access the block diagram)
**This document has been updated to meet the current required format for the NI Code Exchange.**