private void InvokeAppendListBoxAction(UIListBox box, string message) { if (box.InvokeRequired) { InvokeAppendListBoxActionDelegate d = InvokeAppendListBoxAction; box.Invoke(d, box, message); } else { box.Items.Add(message); box.SelectedIndex = box.Items.Count - 1; } }