I wrote a small application in C #, where its main process takes a long time to run. I'm having a problem with the lack of response from the application GUI during the execution of this process. Through help obtained here in stackoverflow , I was helped to create a thread to execute this process. However, I'm still experiencing this problem of non-response of the application during the long process.
Look how I did it:
private void GeraRelatorio_Click(object sender, RoutedEventArgs e)
{
Thread geraRelatorio = new Thread(GeraRelatorio_Thread);
geraRelatorio.SetApartmentState(ApartmentState.STA);
geraRelatorio.Start();
return;
}
I'm still going to study about threads , but the problem has come before the time. Does anyone know how I make the interface respond during the process?