I am trying to figure out why my application's icons display differently when the program is running from the Program Files (x86) directory.
When running the Release version of the code from the Release folder, the ToolStripMenuItem icon displays correctly inside of the right-click menu of the NotifyIcon. However, when I move the executable to the Program Files (x86) folder, the icons are suddenly smaller:
I have reviewed the following options and they have not solved the issue:
More information:
- dpi scaling is already enabled in the app.manifest file
- The icons are stored in an ImageList, then copied to the menu items as needed
- The icon is loaded using
Icon.ExtractAssociatedIcon(tp.path).ToBitmap()
I am going to continue attempting things, and hopefully find a fix. Any and all suggestions welcome.
Update #1
I created the following project locally (https://www.codeproject.com/Tips/627796/Doing-a-NotifyIcon-Program-the-Right-Way) and noticed that seems to be a problem with adding DPI awareness. By adding the code to make the app DPI aware (see link 1 above), the menu icons look as follows: