Screen Resoultion more than 640 x 480

Feb 17, 2010 at 10:21 PM

Hi

Im using the latest realase and i want the window size to be 1380 X 768 or more,

 but it gives me an error!What should i do to achieve this

 

Thanks

Tim

Coordinator
Feb 19, 2010 at 1:52 AM

The default screen resolution is 800x600. 

You can simply set the window resolution like the following in your Game constructor:

graphics.PreferredBackBufferWidth = 1200;
            graphics.PreferredBackBufferHeight = 900
graphics.PreferredBackBufferWidth = 1440;
graphics.PreferredBackBufferHeight = 900;

If you simple want the stuff to appear in full screen mode, do:

graphics.IsFullScreen = true;

If you want to call these codes other than in the constructor, then you need to call:

 

graphics.ApplyChanges();

After the above code.

Ohan