Oh yes. You can not call video_switch in an event function!

If you want to switch the resolution on a button click, use:

function 800_600()
{
wait(1);
video_switch(7,0,0);
}