Sorry, forget to answer :(
I ended with this code:
set escape off
inside scan loop
if inkey('H')=27 && H hide the cursor
exit
endif
Seems to work correctly.
Thanks all of you for advices.
>>Nadya,
>>
>>You might try
>>Set Escape On
>>
>>On Escape * && Deaden the escape key
>>
>>And then inside your scan
>>if lastkey()=27
>> exit
>>endif
If it's not broken, fix it until it is.
My Blog