30 October 2011

How to not show Visual Studio line numbers for blank lines?

Is there a way to display only line number of coded lines, i.e. don’t number blank lines? Numbered blank lines makes showing code in powerpoint decks hard to follow. 
 
Here’s the screenshot 
To do this,
  1. Enable Word Wrap (Tools Options – Text Editor – All Languages – General)
  2. At the end of the first real line (like #28 above), start inserting white space until it goes off the screen. Note the Word Wrap glyph.
  3. Turn off the Word Wrap glyph (same place as in step 1) and Turn off “View White Space” (Edit – Advance – View White Space)

HTML5 Intellisense in Visual Studio 2010/2008

HTML5 provide a great intellisense for Visual Studio 2010/2008.  You can download that tool from following link.

Once you download HTML5 then install it and then you need to change your validation to HTML5 in your Visual Studio 2010/2008 configuration. For that you have to follow bellow steps.
Go to Tools -> Options ->(Screen1) and then Text Editor -> HTML -> Validation and there you need to select the HTML5 like following.  as shown below screen 2 and then click on button.

Screen1

Screen 2
Now Visual studio 2010 or 2008 will have intellisense for HTM5. 


21 October 2011

Visual Studio 2008 styles

Visual Studio allows you to completely customize the editor background and text colors to whatever you want – allowing you to tweak them to create the experience that is “just right” for your eyes and personality.  You can then optionally export/import your color scheme preferences to an XML file via the Tools->Import and Export Settings menu command.
  
A New website that makes it easy to download and share VS color schemes

Luke Sampson launched the http://studiostyles.info/ site a week ago (built using ASP.NET MVC 2, ASP.NET 4 and VS 2010). Studiostyles.info enables you to easily browse and download Visual Studio color schemes that others have already created.  The color schemes work for both VS 2008 and VS 2010 (all versions – including the free VS express editions):

You can click any of the schemes to see screen-shots of it in use for common coding scenarios.  You can then download the color settings for either VS 2010 or VS 2008: This site is cool and you can find lots of visual studio 2010 and 2008 styles of your choice. 



I have downloaded the first one(Son of Obsidian). It will be visual studio settings file. 


Once you downloaded you can import like following. GoTo Tools->Import and export settings in Visual Studio 2008. Once you click this It will import and export dialog like following.

I have selected Import selected environment setting and clicked next on next screen you will have option to save your visual studio settings like following.

Clicking on next you will have options for different visual studio 2008 Style like following.

 Click on browse and select your downloaded style like following.

Click on open and then you will represented to recent file options

Click next You will come to final settings wizard like following.


 Click on finish now our style is applied.Close the dialog and open your project and you can see new color scheme for your visual studio 2008 like following.

How to Open Visual Studio Quickly?

Do the following simple steps.
Open Your Visual Studio by typing 'Start' --> 'Run' --> 'DEVENV' then,

1. Click Tools
2. Select Options.
3. Expand Environment.
4. Click Startup.
5. Choose Show Empty Environment in the dropdown for At startup.
6. Disable the Download Content Every checkbox
7. Click OK.  as shown in the below screen shot.