【发布时间】:2010-06-13 19:12:40
【问题描述】:
我有一个在我的 WinXP 机器上运行良好的应用程序。但是,当我尝试在我的 Win7 机器上运行它时,它会在尝试加载嵌入式资源时失败。资源都在那里(我可以使用 Reflector 看到它们)。
失败的行都是这样的:
Splash.Image = new Bitmap(typeof(ContainerForm).Assembly.GetManifestResourceStream("SplashTest.Resources.Logo.gif"));
他们都失败了,但有一个例外:
Exception='System.ArgumentException: Parameter is not valid.
at System.Drawing.Bitmap..ctor(Stream stream)
我不明白为什么这在我的 Win7 机器上不起作用,但在我通常的 WinXP 开发机器上却起作用。
有什么想法吗?
【问题讨论】: