How do I keep a responsive UI while processing large amounts of data?

前端 未结 3 1019
野性不改
野性不改 2020-12-06 13:24

I am creating winform to process (convert txt files to tiff) large amount of files. I put all the code behind a button (btnProcess). Is this a good idea? It works but I noti

3条回答
  •  -上瘾入骨i
    2020-12-06 14:00

    It depends on your application. If this is a single purpose application that is not extremely long and the only problem is the screen doesn't paint. Which is what it sounds like to me, just throw an Application.DoEvents into the loop and be done with it.

提交回复
热议问题