Fred, would a future release make WindowID() return -1 if there is no
current window in use, instead of the debugger stopping the app? See
my InputBox procedure at this URL to see the reason why:
viewtopic.php?t=2412
Thanks...

PB - Registered PureBasic Coder