private void myUI2(string myStr, Control ctl) { if (this.InvokeRequired) { myUICallBack2 myUpdate2 = new myUICallBack2(myUI2); this.Invoke(myUpdate2, myStr, ctl); } else { ctl.Text = myStr; } }
private void DelUserToList(int i) { if (this.InvokeRequired) { myUICallBack2 myUpdate = new myUICallBack2(DelUserToList); this.Invoke(myUpdate, i); } else { lbUser.Items.RemoveAt(i); } }