This works for me.

Code:
function set_screen() //put this on a menu button
{
		resolution.visible = on; //background panel
		resolution_txt.visible = on; //explanation
}



var screen_change;
Function set_window() //will toggle between window and full
{
	if(screen_change == 0)
	{
		screen_change = 1;
		video_set(1024,768,0,0); //change for size
		video_switch (8, 32, 2); //change depth, mode
		resolution.visible = off;
		resolution_txt.visible = off;
		
	}
	else
	{
		screen_change = 0;
		video_switch (8, 32, 1);
		resolution.visible = off;
		resolution_txt.visible = off;
		
	}
	
}



Make the mouse visible during the resolution panel.