多くのコンピューターで .NET 2.0 プログラムを実行しています。1 つでは、アプリケーションをリセットするまで、このエラーが繰り返し発生していました。
//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)
リソースは存在し、リセットすると正常に動作します。誰かが起こっている可能性があることについての洞察を提供できますか?