c# - Main Form got hang during long running process in different thread. -
i'm using threading in windows form application.
code
thread sqlprocessthread = new thread(new threadstart(dosqlwork)); sqlprocessthread.isbackground = true; sqlprocessthread.start(); when ever thread called form @ time form got hang. how can solve problem out using background worker.
you can use property invokerequired check ui acess different thread.
if (this.invokerequired) { this.invoke(new methodinvoker(this.updateui)); return; } more information: msdn documentation
Comments
Post a Comment