Just got a random bsod on my machine and Form1.cs is suddenly empty, is there any way to restore the code? thanks..
You can check C:\Documents and Settings\UserName\My Documents\Visual Studio 2010\Backup Files\ (or the equivalent on your system).
C:\Documents and Settings\UserName\My Documents\Visual Studio 2010\Backup Files\
Files will be placed there if automatic recovery is enabled, which, in my opinion, is the default. If you want to verify that the feature is enabled, follow these steps: http://blogs.msdn.com/b/zainnab/archive/2010/06/30/autorecover-vstipenv0019.aspx
Another top tip is to set โSave all changesโ before creating. This parameter is located in the Parameters section of the Projects and Solutions / Build and Run section.