That program's locked in a tight loop that doesn't give the OS time to respond to your 'close' message (clicking the close gadget, hitting Alt-F4, pressing ESC, etc).
If you stick just about any old command in there, it'll cause a slight delay (eg. many commands will internally read Windows events to be able to update the window), giving the OS enough time to do its 'close window' stuff.
If you're using Blitz 3D, it's always going to be a bit of a CPU hog, unless you add a 'Delay' command in the main loop, but if it's Blitz Plus, you can/should use the event commands to make your program play nicely with the OS.
If you stick just about any old command in there, it'll cause a slight delay (eg. many commands will internally read Windows events to be able to update the window), giving the OS enough time to do its 'close window' stuff.
If you're using Blitz 3D, it's always going to be a bit of a CPU hog, unless you add a 'Delay' command in the main loop, but if it's Blitz Plus, you can/should use the event commands to make your program play nicely with the OS.