Question to intercept the Events of the DTE -
04-20-2004
, 05:06 PM
Problem has to intercept around the events of the IDE,
in a UserControl would like I the behavior (while the DesignMode) the
IDE to intercept, as soon as the window of the IDE in Maximize changes
or Minimize or the Windows of the IDE are moved. Also by means of
'WindowMoved' the EnvDTE.DTE reached, only is lost during the work to
short time of the Handler apparent. After restart of the project again
the Moved Ereigniss is then only implemented. Also as soon as one adds a
Toolbox Item or is the Handler deletes thereafter without function.
I hope myself can someone help and that the following code am
understandable.
CODE of the user control
------------------------
Imports EnvDTE
Protected Overrides Sub OnLoad(ByVal e As System.EventArgs)
Dim envDTE As EnvDTE.DTE
envDTE = CType(Me.ParentForm.Site.GetService(GetType(EnvDTE .DTE)),_
EnvDTE.DTE)
AddHandler envDTE.Events.WindowEvents.WindowMoved, AddressOf_
WindowEvents_WindowMoved
End Sub
Private Sub WindowEvents_WindowMoved(ByVal Window As EnvDTE.Window,_
ByVal Top As Integer, ByVal Left As Integer, ByVal Width As Integer,_
ByVal Height As Integer)
MsgBox("moved")
End Sub
-----------
Please Help me !!!!
Anton |