The digital panel meter shown in the attached picture was created using existing tools and not writing any code. This is how it was done:
- Download the fonts from this web site:
http://www.keshikan.net/fonts-e.html- Extract and install the 7 segment fonts by double clicking on the ttf files
- Download and save the second image attached to this post to be used as the meter fame
- In Visual Studio with the AdvancedHMI project open, double click MainForm in Solution Explorer
- From the Toolbox, add a Panel to the form from the Container group
- Set the Size to 294, 130
- Set the Backcolor to 0, 32, 0
- Set BackgroundImageLayout to Stretch
- Click in the BackgroundImage property and click the ellipsis button to open the Select Resource window
- Select the Project Resource file radio button
- Click the Import button
- Browse to the frame image downloaded from this post
- From the Toolbox, add an AnalogValueDisplay into the Panel with the frame image
- Set Autosize to False
- Set the Location to 28, 39
- Set the Size to 232, 51
- Click in the font property and click the ellipsis button to open the Font window
- Select the DSEG7 Classic font
- Set to Bold Italic and a size of 38
- Set TextAlign to MiddleRight
- Set Forecolor to 0, 192, 0
You should now have the digital panel meter as shown in the attached picture. If you want to control the number of decimal places, you can use NumericFormat, for example set it to 0.0