I am working on C++(CLR Project for OpenCV better GUI). I have two forms in CLR Project: parentForm and childForm. Both use BackgroundWorker.
parentForm is reading frames from all connected camera device(s) and displaying them in pictureBox(s). It create childForm on pictureBox click_event. childForm is performing background-Subtraction on selected camera device and displaying result in pictureBox.
Problem is: Since both forms using their own backgroundWorker. If i run parentForm, and close it: no Problem. But if I run ParentForm, load ChildForm from it(two backgroundWorker in this case), it throws an Exception (System.Runtime.InteropServices.SEHException
)
I read on StackOverflow that if one form closed, all running backgroundWorker stops, i.e. here. Please help or give me any idea how to handle BackgroundWorker for each multiple Form!