History - 2011

How to backup a SQL Express database in Visual Studio 2010

08 Feb 2011

The easiest way to backup your SQL Express database is use a SQL Management Studio but if you don’t have it installed it is possible to do it from within Visual Studio itself.

  • Open up the Server Explorer, right click on the database you wish to backup and select the New Query option to open up a query panel.
  • Enter the following T-SQL command in the query panel section (typically the third panel down).

Texture2D resizing in XNA 4.0

08 Feb 2011

If you have a requirement to display a group of images of varying dimensions in a consistent manor then you will probably want to resize them as you draw them to the screen. One way to do this is to use one of the overloaded Draw methods of the SpriteBatch object that take a ‘scale’ parameter.

The demo code below does exactly this.  Initially we want to load a list of pict