上面的错误ty也捕获不到啊 而且出现后怎样处理  谢谢各位大神拉拉

解决方案 »

  1.   

    就是普通的上控件里面刷图像啊 pictureBox1.Image
      

  2.   

    释放资源
    picturebox怎么使用的
      

  3.   

    Application.ThreadException += new ThreadExceptionEventHandler(Application_ThreadException);
                AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException);
    void CurrentDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e)
            {
                if (e.ExceptionObject is OutOfMemoryException)
                {
                }
            }        void Application_ThreadException(object sender, ThreadExceptionEventArgs e)
            {
                if (e.Exception is OutOfMemoryException)
                {
                }
            }
      

  4.   

    1。如果图片是从数据库里读的,最后要关闭 读写流
    2. Image img = Image.FromFile("d:\\1.jpg");
                pictureBox1.Image = img;
                img.Dispose();