Does anyone know how to resize the monitor? Some api or something?

I built my application as 800x600 stage size, I want to resize the monitor to 800x600 with a button that says "full screen" and then have a button that would switch back to the users previous monitor res.