You need to know the current screen resolution (for full screen mode) and separately you need to know the window resolution (window mode) Are there any standard functions in C # or in XNA to get this information?

ps for the window mode you can make it possible to select the window resolution, and these values ​​can be manually entered as options, but for full-screen mode you need to know the possible correct resolutions: my screen has a resolution of 1366x768 and someone has 1920x1080

    3 answers 3

    It is possible so:

    SystemInformation.PrimaryMonitorSize 

    Or so:

     SystemInformation.VirtualScreen 

    Or like this:

     System.Windows.Forms.Screen.PrimaryScreen.Bounds 
       var graphics = new GraphicsDeviceManager(this); 

      Fields PrefferedBackBufferHeight and PrefferedBackBufferWidth.

      • These fields set the values ​​for the application, and do not allow to know the screen resolution - StriBog
       GraphicsAdapter.DefaultAdapter.CurrentDisplayMode.Height; GraphicsAdapter.DefaultAdapter.CurrentDisplayMode.Width;