In the previous issue, we customized the icon file for the file type:
Registry. SetValue (,,);
If you need to define many file types (for example, a player needs to define avi, mp4, flv, and many other video format icons), you need a bunch of ico files. If the user of the program deletes an ico file one day, it will be displayed as the ugly default icon in Explorer. Therefore, it is a good method to package all ico files into exe files.
For how to package (compile) the ico file into the exe file, see compile multiple Icon files into the C # program.
Assume that we have compiled two icofiles into the guo.exe file. The first is the default icon of the exe, and the second icon is the Guo. ico above. Then, the above Code should be changed:
Registry. SetValue (,,);
Worker uses the second icon of guo.exe as the default icon. Note that the subscript here starts from 1 rather than from 0.
The same is true for using dll as a resource file;