QueryStatus Method
Collapse the table of content
Expand the table of content

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)

abstract QueryStatus : 
        CmdName:string *
        NeededText:vsCommandStatusTextWanted *
        StatusOption:vsCommandStatus byref *
        CommandText:Object byref -> unit


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
© 2015 Microsoft