Takasur
Takasur

Reputation: 462

Programmatically monitoring which tab is opened in visual studio

Let's start with an example, User have several tabs opened for a solution>project in Visual Studio (Default.aspx, Default.aspx.cs) I programmatically want to monitor devenv.exe process and want to know which tab (file to be exact) user is working on. If there's some log file or process object has some attribute that tells? Or it has to be done with image processing?

Upvotes: 1

Views: 106

Answers (1)

Sergey Vlasov
Sergey Vlasov

Reputation: 27890

You can write an extension for Visual Studio and monitor DTE.Events.WindowEvents.WindowActivated. From an active window you can get Document.FullName for a file user is working on.

See for example Display document path of the active window in the status bar.

Upvotes: 3

Related Questions