private bool TryLockVolumes(DiskDrive disk) { try { disk.LockVolumes(); return(true); } catch (Exception ex) { MessageBox.Show(string.Format("Could not lock volume(s) on disk drive {0}. Please ensure that no other program is accessing this drive.\n\nException: {1}", disk.ID, ex.Message), "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); return(false); } }