CommandEventsClass.BeforeExecute Event

 

This API supports the product infrastructure and is not intended to be used directly from your code.

Occurs before a command executes.

Namespace:   EnvDTE
Assembly:  EnvDTE (in EnvDTE.dll)

public virtual event _dispCommandEvents_BeforeExecuteEventHandler BeforeExecute

Before executing the function that is declared to be the implementation of a command, the BeforeExecute event occurs. Any number of listeners may be registered for the event. Each listener executes when the event occurs.

If a listener claims it has implemented the command, no other listener or function should try to implement the command. A listener claims to have implemented the command by returning true for the handled parameter. If a listener only performs some extra function that was not supposed to be performed, such as making a log entry that the command fired or perhaps incrementing a counter displayed somewhere, then the listener returns false for the handled parameter.

Use CommandEvents.BeforeExecute.

Public Sub CommandEvents_BeforeExecute(ByVal Guid As String, ByVal ID As Integer, ByVal CustomIn As Object, ByVal CustomOut As Object, ByRef CancelDefault As Boolean) Handles CommandEvents.BeforeExecute
   MsgBox("test")
End Sub
Return to top
Show: