private void button1_Click(object sender, EventArgs e) { if (listBox1.SelectedIndex != -1) { //your code logic } else { MessageBox.Show("Please select anyone"); } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)