C#
[C#] Invoke, InvokeRequired
키플레이어
2021. 2. 16. 14:32
반응형

delegate void AddList();
public void Add_cross(){
try{
if (this.InvokeRequired){ //다른 스레드에서 접근이 필요하면
AddList d = new AddList(Add_cross);
this.Invoke(d, new object[] {});
}else
Add_lstView_Room(strId, strRTitle, strRMaxUser, strOpenRoom);
}catch (Exception ex){
wnd.Add_MSG("List 크로스 오류: " + ex.Message);
}
}
반응형