Simple code to illustrate. Problem occurs in both fullscreen exclusive and windowed modes. Problem also occurs using any display mode change. Program crashes back to Windows rather than waiting for the space bar to be pressed like it should. Also, after the display mode change, the LOAD MESH command also fails (basically anything to do with loading/creating meshes).
set display mode 640,480,16
sync on
sync rate 33
draw to front
autocam off
make object plain 930,1000,1000
make mesh from object 200,930
delete object 930
delete mesh 200
set display mode 800,600,16
make object plain 930,1000,1000
make mesh from object 200,930
delete object 930
wait4key:
sync
if spacekey()=0 then goto wait4key