//Control - Invoke private void SetListBox(String sInput) { // InvokeRequired required compares the thread ID of the // calling thread to the thread ID of the creating thread. // If these threads are different, it returns true. if (this.lbController.InvokeRequired) { SetItemsCallback d = new SetItemsCallback(SetListBox); this.Invoke(d, new object[] { sInput }); } else { this.lbController.Items.Add(sInput); this.lbController.SelectedIndex = this.lbController.Items.Count - 1; } }