"Not Responding" Message in Windows Form Application

G

G_Zola

When there is a statement in a windows form application which is executing in an infinite loop, the name of the form will show "Not Responding". How does .NET determine if the application is in an unstable state? I wonder if WMI is the right way to track the application? If so, what is the right way to start? If not, is there a way to determine the unstable state of an application?

Welcome any advice

From http://www.developmentnow.com/g/6_2005_4_0_0_0/dotnet-framework.htm

Posted via DevelopmentNow.com Groups
http://www.developmentnow.com
 
D

Dmytro Lapshyn [MVP]

Hi,

It's not .NET, it's the operating system who detects that the application is
unresponsive. An application is deemed unresponsive if it does not process
Windows messages in its message queue for a certain amount of time.

There's a WinAPI function, IsHungAppWindow, you can potentially use to
detect an unresponsive application. The MSDN docs on this function define
exact conditions for an application to be considered unresponsive.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top