资源:
  internal static System.Drawing.Bitmap progressBar_BackgroundPicture {
            get {
                object obj = ResourceManager.GetObject("progressBar_BackgroundPicture", resourceCulture);
                return ((System.Drawing.Bitmap)(obj));
            }使用 : System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FrmMain));this.progressBar.BackgroundPicture = ((System.Drawing.Image)(resources.GetObject("progressBar.BackgroundPicture")));单步调试的时候运行到这里就报:在 System.IO.FileNotFoundException 中第一次偶然出现的“mscorlib.dll”类型的异常
在 System.IO.FileNotFoundException 中第一次偶然出现的“mscorlib.dll”类型的异常
在 System.UnauthorizedAccessException 中第一次偶然出现的“mscorlib.dll”类型的异常
在 System.UnauthorizedAccessException 中第一次偶然出现的“mscorlib.dll”类型的异常
在 System.UnauthorizedAccessException 中第一次偶然出现的“mscorlib.dll”类型的异常
折腾2天了。请各位大虾帮忙分析一下可能的原因 。多谢! 

解决方案 »

  1.   

    搞Web的..........那好像不会。。
      

  2.   

    资源文件中有这个progressBar.BackgroundPicture吗
      
    *****************************************************************************
    欢迎使用CSDN论坛专用阅读器 : CSDN Reader(附全部源代码) http://feiyun0112.cnblogs.com/
      

  3.   

    有的在 System.IO.FileNotFoundException 中第一次偶然出现的“mscorlib.dll”类型的异常 
    是找不到资源, 改为 
    this.progressBar.BackgroundPicture = application.Properties.Resources.progressBar_ForegroundPicture; 
    这个问题就没了 在 System.UnauthorizedAccessException 中第一次偶然出现的“mscorlib.dll”类型的异常 
    是说权限问题吧?? 权限问题怎么设置