Click to Rate and Give Feedback
MSDN
MSDN Library
Visual Studio 2005
Visual Studio
Visual Studio SDK
Reference
Interfaces

  Switch on low bandwidth view
This page is specific to
Microsoft Visual Studio 2005/.NET Framework 2.0

Other versions are also available for the following:
Visual Studio SDK
IVsSelectionEvents Interface

Notifies registered VSPackages of changes to the current selection, element value, or command UI context.

Namespace: Microsoft.VisualStudio.Shell.Interop
Assembly: Microsoft.VisualStudio.Shell.Interop (in microsoft.visualstudio.shell.interop.dll)

Visual Basic (Declaration)
<InterfaceTypeAttribute(1)> _
<GuidAttribute("82871589-D680-4D86-B969-9D1102B00F6F")> _
Public Interface IVsSelectionEvents
Visual Basic (Usage)
Dim instance As IVsSelectionEvents
C#
[InterfaceTypeAttribute(1)] 
[GuidAttribute("82871589-D680-4D86-B969-9D1102B00F6F")] 
public interface IVsSelectionEvents
C++
[InterfaceTypeAttribute(1)] 
[GuidAttribute(L"82871589-D680-4D86-B969-9D1102B00F6F")] 
public interface class IVsSelectionEvents
J#
/** @attribute InterfaceTypeAttribute(1) */ 
/** @attribute GuidAttribute("82871589-D680-4D86-B969-9D1102B00F6F") */ 
public interface IVsSelectionEvents
JScript
InterfaceTypeAttribute(1) 
GuidAttribute("82871589-D680-4D86-B969-9D1102B00F6F") 
public interface IVsSelectionEvents

To receive notifications, you must first register with the SVsShellMonitorSelection service by calling AdviseSelectionEvents. The pSink parameter to this method holds a pointer to your IVsSelectionEvents interface.

Each method in IVsSelectionEvents reports a different type of change. For example, when the current selection changes, your OnSelectionChanged method is called.

Notes to Implementers VSPackages implement IVsSelectionEvents to be able to track selection changes in the environment.

Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2009 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker