Solved

visual studio editor colors

Posted on 2011-03-02
10
495 Views
Last Modified: 2012-05-11
Hi,

I am using visual studio 2008 pro.  I want to control the color scheme of my visual basic code.  Specifically, I want to set the color of comments and variables.  For example, I have

<%
' File: FileName1.asp

...

Dim Avar

...
%>

Currently everything renders in black.  I went to tools-options-environment-fonts and colors and looked at the color coding for the Text editor.  Every item that had "comment" as part of the name was green.  I also reset the text editor to defaults.  But all of my code is still black.

This should be simple, but I just don't see it.  Help would be appreciated.
0
Comment
Question by:santaspores1
  • 6
  • 4
10 Comments
 
LVL 2

Expert Comment

by:clayhopkins
ID: 35024265
If you're writing VB code, aren't comments indicated by a single quote (apostrophe)?
0
 

Author Comment

by:santaspores1
ID: 35025966
Yes.  The issue is... how do I configure the IDE to change the color used for VB comments and key words and variables etc.
0
 
LVL 2

Expert Comment

by:clayhopkins
ID: 35027812
Hmm, the steps you describe should work.  Do you have the latest updates for .NET 3.5?
0
 

Author Comment

by:santaspores1
ID: 35028816
Hi Clay

Yes, the steps should work and I actually assume they do.  I just need to verify that the Text editor is what I should be configuring, and then I need to know what the vb comments etc are called so I can find them in the list.  

If you can create an asp page using vb, add a comment, and then change the color of your comment within the IDE... then you will have figured out what I have not.

0
 
LVL 2

Accepted Solution

by:
clayhopkins earned 250 total points
ID: 35033556
Hi again-

Ok after much playing around, this is how my VS 2008 operates.  In an aspx file, with page language set to "VB", comments are "HTML Comment".  In a straight .vb file, comments are "Comment".  I couldn't get the color to change on existing comments, but if I uncommented and recommented the line, the color change showed up in both files.  I was also using the comment/uncomment buttons, which seemed to work better.

Hope this helps!
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

Author Comment

by:santaspores1
ID: 35061173
Thanks for that test Clay!  Unfortunately it didn't help.  I have a classic asp file.  The page language is set to VB.  Both my "HTML Comment" and "Comment" items are set to foreground=green.  I can uncomment and recomment the lines, but they are black each and every time.

The comments  and variable names are in the form of:
<%
' File: FileName1.asp (this is a commented out line)

...

Dim Avar (this is a variable declaration

...
%
0
 

Author Comment

by:santaspores1
ID: 35061183
p.s. Clay... I would be happy to give you the points.  But I just don't have any solution to my problem...
0
 
LVL 2

Expert Comment

by:clayhopkins
ID: 35069075
No problem, I'm puzzled as to what's going on.  Have you gone so far as to reinstall VS?
0
 

Author Comment

by:santaspores1
ID: 35084012
Reinstall...No, not for color-coding.  I think I will award this to you and just play with it later.  Too busy now.
0
 

Author Closing Comment

by:santaspores1
ID: 35084018
Thanks for your time Clay.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Welcome, welcome!  If you are new to the series and haven't been following along, please take a brief moment to review the first three installments: Part 1 (http://www.experts-exchange.com/Programming/Languages/Visual_Basic/VB_Script/A_266-VBScri…
Over the years I have built up my own little library of code snippets that I refer to when programming or writing a script.  Many of these have come from the web or adaptations from snippets I find on the Web.  Periodically I add to them when I come…
The viewer will learn how to use NetBeans IDE 8.0 for Windows to connect to a MySQL database. Open Services Panel: Create a new connection using New Connection Wizard: Create a test database called eetutorial: Create a new test tabel called ee…
The viewer will learn how to use and create keystrokes in Netbeans IDE 8.0 for Windows.

910 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now