473,321 Members | 1,916 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,321 software developers and data experts.

how to change font color in Macro?

How to write a macro for the following purpose.
1.Search the lines start with "//*"in CSharp file .
2.Change font color of that lines.
I wrote the following code
Sub ChangeFontColor()

Dim props As EnvDTE.Properties
props = DTE.Properties("FontsAndColors", "TextEditor")
Dim prop As EnvDTE.FontsAndColorsItems =
props.Item("FontsAndColorsItems").Object
prop.Item("Comment").Foreground =
ColorTranslator.ToOle(System.Drawing.Color.HotPink )

End Sub

But all comments are changed to HotPink color.
I need only the comments starting with "//*"
Plz help me dear friends...

Aug 7 '07 #1
0 1202

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: S.W. Rasmussen | last post by:
A trivial (?) question: does anyone know how to change the shape of the cursor in a RichTextBox control from the normal vertical line to an underscore?
16
by: Coder Droid | last post by:
I'm trying my first table-less site, and I've bumped my head up against a wall. I can't change the font size within a div. Real quick, my style sheet has: -------------------------------------...
300
by: Ståle Sæbøe | last post by:
I am a bit curious about this. The graphic design people I work with say it is their preferred font for web pages. The reason being that it is "kinder" to the eye both in terms of shape and...
9
by: Dr John Stockton | last post by:
Assuming default set-ups and considering all reasonable browsers, whatever that may mean, what should an author expect that his readers in general will see (with visual browsers) for a page with...
4
by: Ronny Sigo | last post by:
Hello all, I am trying to programmatically change the orientation of a MS Word Document to landscape. I must be doing something wrong cause it does not work ... can anybody help me with this?...
4
by: John hoffman | last post by:
Hello, I am trying to set the MS Excel header and footer font using automation from C#. I can set the text using: oPageSetup.LeftHeader = "Header Text"; but how do you set the Font...
1
by: Weixiao Fan | last post by:
as we know , FONT is not availble for XHTML standard . but VS.NET 2003 add it automatically. what can I do to make all the BODY , TD , FONT and so on to body ,td ? and don`t let it add <FONT>...
2
by: Jim | last post by:
Working with VB.net under VS.Net 2003. Have a simple form with a Button1. I want to change the font on the button when the button is clicked. Is there a way to Dynamically change the Font for...
0
by: Meera | last post by:
How to write a macro for the following purpose. 1.Search the lines start with "//*"in CSharp file . 2.Change font color of that lines. I wrote the following code Sub ChangeFontColor() Dim...
3
by: DNolan | last post by:
Hello, I was wondering if anyone could help me. I have an access form with tabbed pages on it. I would like the colour of the tab name to change when a user inputs information into the fields on...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.