Hi
My Windows Forms program exits with the following error:
An unhandled exception of type 'System.InvalidOperationException' occurred in System.Drawing.dll
Additional information: Object is currently in use elsewhere.
My program consists of a tabControl component with two tabs. The first tab has a picture box where I constantly place new images. The second tab has other stuff. Everything works fine when I remain in the first tab and continuously place images in the picture box, but if I switch to the second tab, then back to the first, I get the error stated. There is another thread apart from the UI thread that does the actual placement of images in the picturebox. What is causing the error?
My Windows Forms program exits with the following error:
An unhandled exception of type 'System.InvalidOperationException' occurred in System.Drawing.dll
Additional information: Object is currently in use elsewhere.
My program consists of a tabControl component with two tabs. The first tab has a picture box where I constantly place new images. The second tab has other stuff. Everything works fine when I remain in the first tab and continuously place images in the picture box, but if I switch to the second tab, then back to the first, I get the error stated. There is another thread apart from the UI thread that does the actual placement of images in the picturebox. What is causing the error?