1. Recently done a project is under the Win7 use VS2010 developed WinForm software, in the normal operation, after packaging installation, found that the desktop shortcut can not be displayed, looked for a long time, on-line data check and check, the most in a friend's blog reminder finally took care of, I found my ico icon is 150*170px, a netizen said in XP or Win7 window icon or shortcut icon size can not exceed 128*128px, inspired by this, I changed the picture to 100*100px, and then use, the results can be displayed, summary, XP or win7 the window icon or shortcut icon size should not exceed 128*128px, otherwise the icon cannot be loaded
2. Then after installation to XP, found that the software can not run, start screen pop-up, a flash, and nothing hint, start is very puzzled, finally found also the problem of the icon, in the Win7 window properties Select the ICO icon can not be loaded, and then cause the software to not run,
Workaround, add the following code to the main window's constructor:
Try
{
This. Icon = new System.Drawing.Icon (Application.startuppath + @ "\resources\xxx.ico");
}
catch (Exception)
{
}
That's it, I'll summarize it, so that I can remember ...
Win7 VS2010 under the development of CS software, installed to XP can not be run or desktop shortcut can not display the icon problem resolution method