System.ComponentModel.Win32Exception: The operation completed successfully

前端 未结 8 1456
無奈伤痛
無奈伤痛 2020-12-04 22:20

I am getting this exception sometimes while running my Windows Forms app for a long time:

System.ComponentModel.Win32Exception: The operation completed succe         


        
相关标签:
8条回答
  • 2020-12-04 22:51

    Its caused in extreme cases by not disposing images. You should make use of IDisposable when loading bitmaps to overcome this;

    using(Bitmap b = Bitmap.FromFile("myfile.jpg"))
    {
       //Do whatever
    }
    
    0 讨论(0)
  • 2020-12-04 22:57

    Found this which may help - seems to be a Graphics or Control disposal issue

    0 讨论(0)
提交回复
热议问题