How do I get rid of the delay when my program ends

BlitzMax Forums/BlitzMax Programming/How do I get rid of the delay when my program ends

When using OpenGL there's no delay when I end my program, but when I use Direct3D, there's a two second delay when the program ends before it goes back to the desktop when running in fullscreen mode.

Has anyone figured out how to reduce this delay? I don't see why there should be any delay at all.