Guest User

Untitled

a guest
Jun 23rd, 2018
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.75 KB | None | 0 0
  1. GraphicDevice.PreferredBackBufferHeight = height;
  2. GraphicDevice.PreferredBackBufferWidth = width;
  3.  
  4. GraphicsDevice.ApplyChanges();
  5.  
  6. if (!GraphicsDevice.IsFullScreen)
  7. GraphicsDevice.ToggleFullScreen();
  8.  
  9. GraphicsMan = new GraphicsDeviceManager(this);
  10. GraphicsMan.IsFullScreen = false;
  11. GraphicsMan.PreferredBackBufferHeight = 340;
  12. GraphicsMan.PreferredBackBufferWidth = 480;
  13.  
  14. // Resize the screen to 1024 x 768.
  15. IntPtr ptr = this.Window.Handle;
  16. System.Windows.Forms.Form form = (System.Windows.Forms.Form)System.Windows.Forms.Control.FromHandle(ptr);
  17. form.Size = new System.Drawing.Size(1024, 768);
  18.  
  19. graphics.PreferredBackBufferWidth = 1024;
  20. graphics.PreferredBackBufferHeight = 768;
  21.  
  22. graphics.ApplyChanges();
Add Comment
Please, Sign In to add comment