c# change framework error

后端 未结 4 1618
一生所求
一生所求 2021-01-13 03:28

I am running Visual Studio 2010. I just change the frame work of my project from 4.0 to 3.5. I removed the reference Microsoft.Framework that it asked me to remove then trie

4条回答
  •  梦谈多话
    2021-01-13 04:00

    Having this problem for a long time, i lost hope that microsoft fix this bug ever. Then i begin use manual written code for handle pictures contains in resources:

    string resource = "Company.Namespace.Resources.picture.gif";
    pictureBox1.Image = new Bitmap(Assembly.GetExecutingAssembly()
    .GetManifestResourceStream(resource));
    

    Dot forget to set property "Build action" of picture.gif to "Embeded resource"

提交回复
热议问题