11

Being 8 hours trying to update the GUI from another a thread without the GUI freezing. Finally made it.

Comments
  • 1
    What language?
  • 0
    @Lel00 c# using Windows Forms
  • 1
    @shadow117 Ah, yeah that took me a bit to figure out as well!

    In fact I almost always make a "MultithreadGUI" class for WinForm protects
  • 1
    @Lel00

    I had made a 1st version using a thread but when I was running code on the thread calling this.Invoke the interface breaked always.

    Then added Thread.Sleep(1000) on the worker Thread and it worked, but, was a ugly solution. It would take a long time to load what I wanted.

    So no Thread.Sleepsss and only Invoke when necessary :D

    PS: And forgot to mention the killer Abort() on some events. Holy fuck. But a task came at my rescue :D
Add Comment