"Not Responding" Message in Windows Form Application

  • Thread starter Thread starter G_Zola
  • Start date Start date
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
 
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.
 
Back
Top