次の方法で共有


IVsTaskItem2.ImageListIndex Method

Returns the index into the image list maintained by a provider.

Namespace:  Microsoft.VisualStudio.Shell.Interop
Assembly:  Microsoft.VisualStudio.Shell.Interop (in Microsoft.VisualStudio.Shell.Interop.dll)

Syntax

'宣言
Function ImageListIndex ( _
    <OutAttribute> ByRef pIndex As Integer _
) As Integer
'使用
Dim instance As IVsTaskItem2
Dim pIndex As Integer
Dim returnValue As Integer

returnValue = instance.ImageListIndex(pIndex)
int ImageListIndex(
    out int pIndex
)
int ImageListIndex(
    [OutAttribute] int% pIndex
)
function ImageListIndex(
    pIndex : int
) : int

Parameters

  • pIndex
    Type: System.Int32%

    [out, retval] Pointer to the index into the image list.

Return Value

Type: System.Int32

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

Implements

IVsTaskItem.ImageListIndex(Int32%)

Remarks

COM Signature

From vsshell.idl:

HRESULT IVsTaskItem::ImageListIndex(
   [out,retval] long *pIndex
);

If you have provided a custom image list to represent a category or subcategory, return the correct index into it. Each task provider can provide one image list using the ImageList. Each task item can then specify an image into this list using the ImageListIndex method. Otherwise, return one of the _vstaskbitmap enumerators to use one of the default bitmaps.

Permissions

See Also

Reference

IVsTaskItem2 Interface

IVsTaskItem2 Members

Microsoft.VisualStudio.Shell.Interop Namespace