private void removeFromList(string ip) { if (this.InvokeRequired) { this.Invoke((MethodInvoker) delegate { removeFromList(ip); }); } else { for (int i = 0; i < lbClients.Items.Count; i++) { if (lbClients.Items[i].SubItems[2].Text == ip) { administrate panel = GetAssosicatedPanel(lbClients.Items[i].SubItems[2].Text); lbClients.Items.RemoveAt(i); if (panel != null) { panel.Intermission(); } break; } } } }