共用方式為


IVsLibraryMgr.ToggleCheckAt(UInt32) Method

Definition

Tells the requested library to toggle its current checked state.

public:
 int ToggleCheckAt(System::UInt32 nLibIndex);
public:
 int ToggleCheckAt(unsigned int nLibIndex);
int ToggleCheckAt(unsigned int nLibIndex);
public int ToggleCheckAt (uint nLibIndex);
abstract member ToggleCheckAt : uint32 -> int
Public Function ToggleCheckAt (nLibIndex As UInteger) As Integer

Parameters

nLibIndex
UInt32

[in] Specifies the zero-based index of the library of interest.

Returns

If the method succeeds, it returns S_OK. If it fails, it returns an error code.

Remarks

COM Signature

From vsshell.idl:

HRESULT IVsLibraryMgr::ToggleCheckAt(  
   [in] ULONG nLibIndex  
);  

IVsLibraryMgr.ToggleCheckAt and GetCheckAt are used only if the IVsLibrary in question is not expandable (_LIB_FLAGSLF_EXPANDABLE is not set and GetLibList is not implemented), yet provides a global component for browsing. In such a case, the user sees a check box with the library's display name in the Selected Libraries dialog of the Object Browser. ToggleCheckAt is called as the user selects or un-selects this check box.

Note

The Object Manager persists this checked state across Visual Studio.NET sessions.

Applies to