Any way to set the color options for the solution (VS2010)?

Is there any way to configure VS2010 to use different color schemes for different solutions? On the Macintosh, in the 1990s, I could add wctb resources to documents so that they open with different color schemes. This simplified the search for the desired window, and also helped to avoid accidentally entering something into the wrong document (otherwise it is easy to do if you open several similar documents). Is there a good way to achieve a similar effect in VS2010? Basically, I would like to change the background color of the text and the background color of the window.

When I used vs2005 and vbEx2005, I could install vbEx on one circuit and against the other, but now I am using vs2010 for everything. Is there a good way to set colors for each project?

+4
source share
4 answers

Without writing any code. As Jared already mentioned, the colors you want to change are part of the VS level settings. Nevertheless, it would be possible to create a VS extension (or even just a macro) that would switch the settings to specific solution parameters when the solution is open.

+4
source

Here is a good way to do it. Select "Macro IDE ...", then open "EnvironmentEvents" and add the following after the "Automatically Generated Code" area:

  Sub handleColorSettings () Handles SolutionEvents.opened, DocumentEvents.documentopening
         Dim myColor As UInt32
         myColor = & HC0FFFF
         Try
             myColor = UInt32.Parse (IO.File.ReadAllText (DTE.Solution.FullName & ".bgcolor.txt"), Globalization.NumberStyles.AllowHexSpecifier)
         Catch ex as exception

         End try
         CType (DTE.Properties ("FontsAndColors", "TextEditor"). Item ("FontsAndColorsItems"). Object, EnvDTE.FontsAndColorsItems) .Item ("Plain Text"). Background = myColor
     End sub

At any time, when a project is opened or a file is opened within the project, the system will search for a file with the name "(fullSolutionName) .bgcolor.txt". If, for example, the solution is "myThing.sln", the file used will be "myThing.sln.bgcolor.txt". If such a file is found and it contains a valid hexadecimal number, which will be used as the background color. Otherwise, the default color will be used (& hC0FFFF higher, but easily replaceable).

+7
source

You can start Visual Studio as a different user and select a different color scheme for each user. First, you need to create a local user with administrator rights. Then right click + Shift in Visual Studio -> Run as another user and enter the created user and password. If you want to run Visual Studio as another user through a batch file, you can use the runas command or download the psexec tool.

+1
source

No. Colors are supported based on the instance of Visual Studio. It is not possible to adjust their finer granularity, such as project level.

0
source

All Articles