Thanks for the input. Since there is also a Kill button on the same menu I needed a way to stop input from just the Send button while the send was running. I found the best way was to set a property on the form to datetime() + 5 when the button is pressed and then check it at the top of the send program, doing a return if the 5 seconds had not passed. It works.
John.
>If you do not mind blocking also the keyboard you can use
>
>
>declare integer EnableWindow in win32api integer, integer
>
>EnableWindow(thisform.hwnd, 0)
>* Your long process
>EnableWindow(.hwnd, 1)
>
>
>But I am not sure if this will leave the calls in the stack, another alternative would be using BlockInput
>
>
>declare BlockInput in win32api integer lBlockIT
>
>BlockInput(.t.)
>* Your long process
>BlockInput(.f.)
>
>
>I understand that blockinput will not leave any calls in the stack, but the side-effect of not even being able to move the mouse is ugly, and I think BlockInput should work, I just run a small test
Beer is proof that God loves man, and wants him to be happy. - Benjamin Franklin
John J. Henn