Const SMTO_BLOCK = &H1
Const SMTO_ABORTIFHUNG = &H2
Const WM_NULL = &H0
Const WM_CLOSE = &H10
Dim lngResult As Long
Dim lngReturnValue As Long
lngReturnValue = SendMessageTimeout(hWnd, WM_NULL, 0&, 0&, SMTO_ABORTIFHUNG And SMTO_BLOCK, 1000, lngResult)
If lngReturnValue Then
MsgBox "Responding"
Else
MsgBox "Not Responding","Block tester"
End If