I got this tip from the book Visual Studio Hacks by James Avery and was contributed by Sara Ford.
Vertical guidelines can be very useful to better organise your code. You can have up to 13 different guidelines in the Visual Studio IDE by adding some minor modifications to the registry. Here are the steps you need to take to add vertical guidelines:
- Close all instances of the Visual Studio IDE (not really required)
- Open the registry editor (Start -> Run -> RegEdit)
- Navigate to the following key for Visual Studio .NET 2003:
HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\7.1\Text Editor
Navigate to the following key for Visual Studio 2005:
HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\8.0\Text Editor
- Add a new string value named "Guides"
- Set the value of the string value to: RGB(128, 128, 128) 4, 16
- Close the registry
- Start the Visual Studio IDE
RGB(128,128,128) sets the color of the guidelines to gray and the numbers 4, 16 mean that we will add a guideline at a 4 and a 16-space mark. Here is the result:

Cross-posted from
The .NET Aficionado