vbAccelerator.Components.ImageList.SysImageList.Icon C# (CSharp) Метод

Icon() публичный Метод

Returns a GDI+ copy of the icon from the ImageList at the specified index.
public Icon ( int index ) : Icon
index int The index to get the icon for
Результат System.Drawing.Icon
        public Icon Icon(int index)
        {
            Icon icon = null;

            IntPtr hIcon = IntPtr.Zero;
            if (iImageList == null)
            {
                hIcon = ImageList_GetIcon(
                    hIml,
                    index,
                    (int)ImageListDrawItemConstants.ILD_TRANSPARENT);

            }
            else
            {
                iImageList.GetIcon(
                    index,
                    (int)ImageListDrawItemConstants.ILD_TRANSPARENT,
                    ref hIcon);
            }

            if (hIcon != IntPtr.Zero)
            {
                icon = System.Drawing.Icon.FromHandle(hIcon);
            }
            return icon;
        }