Help with release of written application in Visual C#

Asked

Viewed 58 times

1

I just finished a small project. In Visual Studio, I chose "Release" to compile and run. I did some tests and the application ran normal.

One of the processes run by the application takes about ten minutes to run on my PC. During the execution of this process the graphical interface is frozen. So far, so good. The process runs normally and the output is as expected.

The problem is when I run the application directly from your location ("Release" folder). When I click on the button that executes the above referenced process, the interface freezes as expected, but if by chance I click with the mouse on any part of the interface the program enters the state "Not responding" and hangs.

The problem only happens if I start the execution other than from Visual Studio.

Does anyone know how I solve this problem?

1 answer

1


You should do this processing using a thread.

So you leave the interface "free", while the secondary thread does the heavy lifting. Even with this you can put a progress bar to show the user who is working.

  • Thank you for corroborating my reasoning. I had already done this, but as Visual Studio betrayed me by not showing that the program would enter this state, I thought it best to leave the program with a single thread, as it would not need to treat the interface to handle events during the process.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.