I ran into same problems.
//setting some default video
video_switch(0, 32, 2);//window and depth
wait(1);
video_switch(8, 0, 8);//1204x768
then i found out that same resolutions works different for 4:3 and widescreens.
So you need to turn on fullscreen or window in default resolution and then switch to your desired. Of course only you know what resolution you need to keep panels in same place.