๐จ๐ผ๐ป๊ฐ๋ฐ/C#
C# - ์ค๋ ๋์์ ์์ ฏ ์กฐ์ํ๊ธฐ
Janger
2022. 8. 23. 06:22
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