4
我在许多计算机上运行.NET 2.0程序。在一个我有重复出现此错误,直到我重置应用程序。设置图像时参数无效
//line below was throwing the exception
this.myButton.BackgroundImage = global::myNamespace.Properties.Resources.myImage;
例外:
ExceptionType: ArgumentException
Message: Parameter is not valid.
Source: System.Drawing
StackTrace: at System.Drawing.Image.get_Flags()
at System.Windows.Forms.ControlPaint.IsImageTransparent(Image backgroundImage)
at System.Windows.Forms.Control.set_BackgroundImageLayout(ImageLayout value)
的资源存在,它工作正常,一旦复位。任何人都可以提供任何见解,可能会发生?
图像文件可能被某些东西锁定了?病毒扫描器突然出现... – CodingGorilla 2012-08-03 12:52:15
叶,同意...禁用防病毒 – Fox 2012-08-03 12:59:49
@CodingGorilla我会尝试,如果我可以复制。 – 2012-08-03 13:05:45