how do i get the width and height of the entire screen in XNA?
47
votes
3 Answers
61
votes
80
votes
Empirically I've found that in XNA 4.0 I need to use
GraphicsDevice.Viewport.Width
GraphicsDevice.Viewport.Height
when running windowed mode, as I find
GraphicsDevice.DisplayMode.Width
GraphicsDevice.DisplayMode.Height
gives me the resolution of the entire screen.
Hopefully this helps someone else out.