msn2222

First off thanks for your time!

Could anyone let me know as to what event I need to tap if I have to catch ActiveDocument changes.
I have two files a.cs and b.cs in my solution and I would like to know when the user switches from one file to another. I know the activedocument changes and I could use the activedocuments name but is there an event that is fired when this happens

Thanks!
Sasha


Re: Visual Studio Extensibility Add in Active Document Change

Ed Dore

Hi Sasha,

You could use EnvDTE.WindowEvents.WindowActivated event. Or if you are package based, you could implement IVsSelectionEvents.OnElementValueChanged and handle the case when it's called with SEID_WindowFrame.

Sincerely,






Re: Visual Studio Extensibility Add in Active Document Change

msn2222


Thanks Ed,
Used WindowEvents. Works just fine!
Sasha