Home > Net > C # winform procedure closing has had two threads end. How to end?
C # winform procedure closing has had two threads end. How to end?
Time:03-19
Written in c # a camera detection procedures, inside the Closed method played a breakpoint, close the main window has been Closed method in circulation return not to go out, see not found two threads have been ended, after directly adopt the method of kill thread can quit, but feel this way out there is a problem, to open the software sometimes even not on the camera, is there any way to know the end of the thread what do you use? Just contact with c #, is not very good, hope everybody can help to look at, thank you!
CodePudding user response:
What do you do in form_closed this is closed, Ed is closed, and exit the program, have you no normal disconnect the related equipment, the next time you open, must be equipment occupied, long-term in the past, could eventually to restart your computer, you should use the form_closing or disconnect the power to release, at the time of shut down, you should disconnect the camera connection, of course, if your connection should be global functions, such as disconnectCam (), hope to help you