XNA: get screen’s width and height

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.

How do I set the window / screen size in xna?

As of XNA 4.0 this property is now found on the GraphicsDeviceManager. Ie. this code would go in your Game’s constructor. graphics = new GraphicsDeviceManager(this); graphics.IsFullScreen = false; graphics.PreferredBackBufferHeight = 340; graphics.PreferredBackBufferWidth = 480; // if changing GraphicsDeviceManager properties outside // your game constructor also call: // graphics.ApplyChanges();

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)