window mode and full screen mode

hi guys. I am working on the setting in my game. I have a feature that the screen can change into window mode or screen mode but i don’t have really an idea how to do that. Can you please help me??