Winform Socket Receive Textbox Value Assignment Not Work
C#/Winform 2021. 8. 10. 09:35C# Textbox Not Updating When Used With SocketIO4NET
I'm having a strange problem. I'm using SocketIO4Net Client for my program written in C#. The program communicates with server written in NodeJS & SocketIO. I'm able to send & receive data
stackoverflow.com
Winform 외부에서 textBox 값 변경할때
값 안 바뀌고 가만히 있으면
this.textBox.Text = msg;//이렇게 쓰지말고
this.textBox.Invoke(new Action(() => textBox.Text = msg));//이렇게써
https://bufferover.tistory.com/3
C# Invoke를 사용해 크로스 스레드 문제를 해결하는 방법
문제 원인 동시성이 있는 멀티 스레드 프로그램 환경에서 특정 스레드에서 생성된 Win Form 컨트롤 ( TextBox, ListView, Label, … )을 다른 스레드에서 접근할 때 발생한다. 스레드에서 안전한 방식으로
bufferover.tistory.com
'C# > Winform' 카테고리의 다른 글
C# Socket Class (0) | 2021.10.13 |
---|