Arman's code will work just fine, although you might also want to take a look at virtual screens.
Also see: