Пример #1
0
        private static IntPtr GetIconHandle(int iImage, SysImageListSize size)
        {
            IImageList spiml = null;
            var        guil  = Shell32.IidImageList2; //or IID_IImageList

            Shell32.SHGetImageList(size, ref guil, ref spiml);
            var hIcon = IntPtr.Zero;

            spiml.GetIcon(
                iImage,
                ImageListDrawItemConstants.TRANSPARENT | ImageListDrawItemConstants.IMAGE,
                ref hIcon
                ); //

            return(hIcon);
        }
 /// <summary>
 /// Creates a SystemImageList with the specified size
 /// </summary>
 /// <param name="size">Size of System ImageList</param>
 public SysImageList(SysImageListSize size)
 {
     this.size = size;
     create();
 }
Пример #3
0
 /// <summary>
 /// Creates a SystemImageList with the specified size
 /// </summary>
 /// <param Name="size">Size of System ImageList</param>
 public SysImageList(SysImageListSize size)
 {
     this.size = size;
     create();
 }
Пример #4
0
 public void Create(SysImageListSize size)
 {
     m_ImageList = new SysImageList(size);
 }
Пример #5
0
 public static extern int SHGetImageListHandle(SysImageListSize iImageList, ref Guid riid, ref IntPtr handle);
Пример #6
0
 public static extern int SHGetImageList(SysImageListSize iImageList, ref Guid riid, ref IImageList ppv);
Пример #7
0
 /// <summary>
 /// Creates a SystemImageList with the specified size
 /// </summary>
 /// <param name="size">Size of System ImageList</param>
 public SysImageList(SysImageListSize size)
 {
     _size = size;
     Create();
 }