IDTCommandTarget.QueryStatus Method (String, vsCommandStatusTextWanted, vsCommandStatus, Object)


Returns the current status (enabled, disabled, hidden, and so forth) of the specified named command.

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

No code example is currently available or this language may not be supported.


Type: System.String

The name of the command to check.

Type: EnvDTE.vsCommandStatusTextWanted

A vsCommandStatusTextWanted constant specifying if information is returned from the check, and if so, what type of information is returned.

Type: EnvDTE.vsCommandStatus

A vsCommandStatus specifying the current status of the command.

Type: System.Object

The text to return if vsCommandStatusTextWantedStatus is specified.

The following example uses the Command object, its AddNamedCommand and AddControl methods, and the IDTCommandTarget interface and its (Exec and QueryStatus) methods, to demonstrate how to make a command appear on the Tools menu in Visual Studio.

Return to top