Vb, Delphi, .net, framework, C++, Java, Pascal,Visual Studio, Asm, Ruby, C#, j#, Cs, Html, Php, Perl, Asp, xHtml Get Free Souce Code Here...



How to detect a program that Not Responding? - Delphi

function IsHung(theWindow: Hwnd; timeOut: LongInt): Boolean;
var
  dwResult: DWord;
begin
  Result:= SendMessageTimeOut(theWindow, WM_NULL, 0, 0 ,
    SMTO_ABORTIFHUNG or SMTO_BLOCK, timeOut, dwResult) <> 0;
end;

you can use FindWindow() function to get Handle of Window.
timOut is in Miliseconds.

0 comments:

Post a Comment