두 번째 스레드에서 호출되는 메서드가 있습니다. public byte[] ReadAllBytesFromStream(Stream input) { clock.Start(); using (...) { while (some conditions) //here we read all bytes from a stream (FTP) { ... (int-->) ByteCount = aValue; ... } return .... ; } } private void clock_Tick(object sender, EventArgs e) { //show how many bytes we have read in each second this.label6.Text = ByteCount.ToString() + " B/s"; } 문제는 시계가 활성화되어 있지만 똑딱거리지 않는다는 것입니다.
왜요? 업데이트: Tick 이벤트가 제대로 추가되고 Interval 속성이 1000으로 설정됩니다.
디자인 보기의 폼에 타이머 컨...
#
c
#
multithreading
#
timer
원문 링크 : MyThread 및 타이머 컨트롤의 문제