mfro wrote:There is one other thing he didn't mention (and many coders forgot as well): form_do() returns the index of the exit object of the dialog which was used to dismiss it. If your user decides to double click on the exit object on exit, the return value will have the high bit set additionally.
Look at the code i posted

This was already taken into account. Only problem there: the bit indicating double-click is also stripped from the code the function returns, so you need to change that if you need the information.
You can have some fun double clicking on exit objects in many (namely very early) - public domain and commercial - applications...
Thats not entirely true. Only objects with the TOUCHEXIT flag will behave this way, objects with EXIT flag don't react on double-clicks (or at least, they don't report it with the high-bit set).