0
I wrote a small application in C#, where its main process takes a long time to run. I am having a problem with the lack of response of the graphical interface of the application while running this process. Through help obtained here at stackoverflow, I was helped to create a thread for carrying out this process. However, I still have this problem of lack of application response during the long process.
Look how I did:
private void GeraRelatorio_Click(object sender, RoutedEventArgs e)
{
Thread geraRelatorio = new Thread(GeraRelatorio_Thread);
geraRelatorio.SetApartmentState(ApartmentState.STA);
geraRelatorio.Start();
return;
}
I’ll still study about threads, but the problem came before the time. Does anyone know how to make the interface respond during the process?
In the Stackoverflow-En has a very illustrative example.
– lsalamon
is using Windows Form ?
– Rovann Linhalis
if you are in windows Forms, use the background worker, if so send you example code
– Rovann Linhalis