CommandBar.FindControl Method
Returns a command bar control that matches the specified criteria.
Namespace: Microsoft.VisualStudio.CommandBars
Assembly: Microsoft.VisualStudio.CommandBars (in Microsoft.VisualStudio.CommandBars.dll)
Syntax
'Declaration
Function FindControl ( _
Type As Object, _
Id As Object, _
Tag As Object, _
Visible As Object, _
Recursive As Object _
) As CommandBarControl
CommandBarControl FindControl(
Object Type,
Object Id,
Object Tag,
Object Visible,
Object Recursive
)
CommandBarControl^ FindControl(
[InAttribute] Object^ Type,
[InAttribute] Object^ Id,
[InAttribute] Object^ Tag,
[InAttribute] Object^ Visible,
[InAttribute] Object^ Recursive
)
abstract FindControl :
Type:Object *
Id:Object *
Tag:Object *
Visible:Object *
Recursive:Object -> CommandBarControl
function FindControl(
Type : Object,
Id : Object,
Tag : Object,
Visible : Object,
Recursive : Object
) : CommandBarControl
Parameters
Type
Type: Object[in, optional] The MsoControlType of the control. A value of -1 matches any control type. If this parameter is not specified, the default value is -1.
Id
Type: Object[in, optional] An integer representing the control id. A value of -1 matches any control id. If this parameter is not specified, the default value is -1.
Tag
Type: Object[in, optional] The tag of the control. A value of nulla null reference (Nothing in Visual Basic) matches any tag. If this parameter is not specified, the default value is null.
Visible
Type: Object[in, optional] A Boolean representing the visibility of the control. true matches only visible controls. false matches any control regardless of visibility. If this parameter is not specified, the default value is false.
Recursive
Type: Object[in, optional] Boolean indicating how to search. If true, search only the current command bar; if false, search the current command bar and all descendent command bars. If this parameter is not specified, the default value is false.
Return Value
Type: Microsoft.VisualStudio.CommandBars.CommandBarControl
The CommandBarControl.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.