private void cmsPM_Opening(object sender, CancelEventArgs e) { if (lvPMs.SelectedItems.Count < 1) e.Cancel = true; }