469,645 Members | 1,187 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,645 developers. It's quick & easy.

DTE.find

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
0 2365

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Dan Jones | last post: by
reply views Thread by amit | last post: by
5 posts views Thread by Mike Labosh | last post: by
3 posts views Thread by David T. Ashley | last post: by
reply views Thread by Derek | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.