0
Reply

Object in Use Error While Repainting the form

Rob

Rob

Jul 16 2007 11:06 PM
1.5k
I have a program that makes Asyncronous Web Requests to Security Cameras and displays the Jpg image in pictureBox. The problem is every once in awhile one of the pictureBoxes ends up with a Red X through it and i get a runtime "Object in Use" error. I added try {} catch {} statements in the code that actually handles the request and loads the picture- but it's not happening there.... it seems to be happening when the system automatically refreshes/ redraws the whole form... So my question is- How can i disable the auto form refresh in C# or somehow fix this?