Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

How to: Fire Events When the Editor Loses Focus

[This topic is pre-release documentation and is subject to change in future releases. Blank topics are included as placeholders.]

Sometimes it is necessary to know when an editor loses focus on the window frame. For example, you might need to extract code from a code window after the editor is no longer focused on it. The following procedure provides the steps to follow to receive notification of the editor losing focus.

To fire an event in response to an editor losing focus

  1. Monitor selection events by obtaining an IVsMonitorSelection object from SVsShellMonitorSelection.

  2. Call AdviseSelectionEvents and provide it your IVsSelectionEvents object.

  3. In your call to OnElementValueChanged, look for elementid==SEID_WindowFrame.

  4. Test the varValueNew parameter for two things:

    1. The window frame you are looking for.

    2. The point at which your program loses the selection to that window frame.

See Also

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.