728x90
๋ฐ์ํ
private void AggiornaContatore()
{
if(this.lblCounter.InvokeRequired)
{
this.lblCounter.BeginInvoke((MethodInvoker) delegate() {this.lblCounter.Text = this.index.ToString(); ;});
}
else
{
this.lblCounter.Text = this.index.ToString(); ;
}
}
Invoker ์ฌ์ฉ
์ถ์ฒ:
https://stackoverflow.com/questions/14890295/update-label-from-another-thread
Update label from another thread
I use a thread writing in another class for update a label. The label is contents in Winform Main class. Scanner scanner = new Scanner(ref lblCont); scanner.ListaFile = this.listFiles; Thread t...
stackoverflow.com
728x90
๋ฐ์ํ
'๐จ๐ผโ๐ป๊ฐ๋ฐ > C#' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
C# - ํ๋ก๊ทธ๋จ ์ค๋ณต ์คํ ๋ฐฉ์งํ๊ธฐ (0) | 2022.08.26 |
---|---|
C# - ๋ค๋ฅธ ํ๋ก์ธ์ค๋ผ๋ฆฌ ๋ฉ์์ง(string) ์ ๋ฌํ๊ธฐ(SendMessage) (0) | 2022.08.24 |
C# - ๋ค๋ฅธ ์์ฉํ๋ก๊ทธ๋จ์ ์ ์ดํด ๋ณด์. feat.SPY++ (1) | 2022.08.24 |
C# - http ์์ฒญ(HttpWebRequest) (0) | 2022.06.27 |
C# - ๊ฐ๋จํ API ์์ฒญ & JSON ์ถ๋ ฅ (0) | 2022.02.02 |