// form close void VsMonitor_Close() { //formState.Restore(this); if (vsCoreMonitor != null) { // disconnect all camera vsCoreMonitor.DisconnectCameraAll(); // Dispose vsCoreMonitor.Dispose(); vsCoreMonitor = null; } }