By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,656 Members | 1,027 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,656 IT Pros & Developers. It's quick & easy.

DTE.find

P: n/a
hi,
this is a qry which I m stuck up with

I want to find out that if there is a mechanism to find a
text inside a C# file and replace it with another string.

I am using DTE(EnvDTE) to do it, the find proerty does it,
the results are getting displayed in a find results window
pane , but I m not able to programmatically take the
contents of the pane.

DTE.Find.FindWhat = "catch"
DTE.Find.Target = vsFindTarget.vsFindTargetFiles
DTE.Find.MatchCase = False
DTE.Find.MatchWholeWord = False
DTE.Find.MatchInHiddenText = True
DTE.Find.PatternSyntax =
vsFindPatternSyntax.vsFindPatternSyntaxLiteral
DTE.Find.SearchPath = "Current Project"
DTE.Find.SearchSubfolders = True
DTE.Find.FilesOfType = "*.aspx.cs"
DTE.Find.ResultsLocation =
vsFindResultsLocation.vsFindResults1
DTE.Find.Action = vsFindAction.vsFindActionFindAll
DTE.Find.Execute()
DTE.Windows.Item
(Constants.vsWindowKindFindResults1).Activate()
MsgBox(DTE.ActiveWindow.Caption)

I am able to access the caption of that result pane but
not the contents of that result pane.

pls reply ASAP
Nov 15 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.