Icon() public method

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
return System.Drawing.Icon
Esempio n. 1
0
 private Image GetSystemBitmap(SystemImageList sysImgList, int index)
 {
     System.Drawing.Icon ico = sysImgList.Icon(index);
     if (ico != null)
     {
         return(ico.ToBitmap( ));
     }
     else
     {
         return(null);
     }
 }
Esempio n. 2
0
 /// <summary>
 /// Gets the system bitmap.
 /// </summary>
 /// <param name="sysImgList">The sys img list.</param>
 /// <param name="index">The index.</param>
 /// <returns></returns>
 private Image GetSystemBitmap( SystemImageList sysImgList, int index )
 {
     System.Drawing.Icon ico = sysImgList.Icon ( index );
     if ( ico != null ) {
         return ico.ToBitmap ( );
     } else {
         return null;
     }
 }