When resizing a window in XNA, I use
graphicsDeviceManager.PreferredBackBufferWidth = width; graphicsDeviceManager.PreferredBackBufferHeight = height;
However if the game is not in full screen mode on a PC monitor, this code sets the size of the content within the window. This doesn't account for the size of the window's peripheries (like the minimize/exit button on the top and the slim borders around the window. So what I really want is to set the total size of the window or subtract the size of the window's borders when setting the size of the content within the window. Does anyone know how to do this?