lundi 29 juin 2015

WPF (Vb.net): How to change the application icon dynamically?

I'm working on a simple application for Windows (if you ask, Windows Vista+ compatible) and I'd like the user to be able to change the icon of the application.

I have two icons, one old and one new, and I'd like the user to be able to go to Settings (for example) and check "Use old icon" or uncheck it, and depending on the chosen option the icon of the application - the shortcut desktop icon, the icon in the tray bar, the icon in the ALT+TAB menu, and so on - will change to the one chosen.

The application can make the change after it has been reopened (it's not important to show it immediatelly).

Is this possible? Or the only way is to set the icon through the project settings before compiling it?

Thanks for your help and time!

Aucun commentaire:

Enregistrer un commentaire