WindowState change event in Visual Studio extensio

2019-08-30 19:34发布

I am looking for an event that will notify me when the main window is minimized and restored in a Visual Studio extension package.

I've looked at the DTE2.Events, as well as the IVsWindowFrame and IVsWindowFrameNotify interfaces but don't see anything that will do what I need.

2条回答
We Are One
2楼-- · 2019-08-30 19:54

The EnvDTE80.DTE2.Events.WindowEvents.WindowMoved event fires on main window minimize and restore.

查看更多
我想做一个坏孩纸
3楼-- · 2019-08-30 20:09

Get the HWND of the VS window: HWnd of Visual Studio 2010

Capture the messages being sent to Visual Studio: C# - Capturing Windows Messages from a specific application

Then wait for a WM_SIZE message: http://msdn.microsoft.com/en-us/library/ms632646%28v=VS.85%29.aspx

查看更多
登录 后发表回答