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

Source: Internet
Author: User

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.