Class Icon Icon class Represents a Windows icon, which is a small bitmap image that is used to represent an object. Icons can be thought of as transparent bitmaps, although their size is determined by the system.
Copy public sealed class Icon : ICloneable , IDisposable , ISerializable
Constructors Name Description Icon (Stream)Initializes a new instance of the Icon
class from the specified data stream. Icon (string)Initializes a new instance of the Icon
class from the specified file name. Icon (Icon, Size)Initializes a new instance of the Icon
class and attempts to find a version of the icon that matches the requested size. Icon (Stream, Size)Initializes a new instance of the Icon
class of the specified size from the specified stream. Icon (string, Size)Initializes a new instance of the Icon
class of the specified size from the specified file. Icon (Type, string)Initializes a new instance of the Icon
class from a resource in the specified assembly. Icon (Icon, int, int)Initializes a new instance of the Icon
class and attempts to find a version of the icon that matches the requested size.. Icon (Stream, int, int)Initializes a new instance of the Icon
class from the specified data stream and with the specified width and height. Icon (string, int, int)Initializes a new instance of the Icon
class with the specified width and height from the specified file.
Properties Name Description Handle { get; }Gets the handle for this Icon. This is not a copy of the handle; do not free it. Height { get; }Gets the height of this Icon. Size { get; }Gets the size of this Icon. Width { get; }Gets the width of this Icon.
Methods Name Description static ExtractAssociatedIcon (string) Returns an icon representation of an image that is contained in the specified file. static FromHandle (IntPtr) Creates a GDI+ Icon from the specified Windows handle to an icon (HICON). Clone ()Clones the Icon, creating a duplicate image. Dispose ()Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. Save (Stream)Saves this Icon to the specified output Stream. ToBitmap ()Converts this Icon to a GDI+ Bitmap. override ToString () Gets a human-readable string that describes the Icon.
See Also