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.
Inheritance Hierarchy
SystemObject
  System.DrawingIcon

Namespace:  System.Drawing
Assembly:  Aspose.Drawing (in Aspose.Drawing.dll) Version: 20.9.0.0 (20.9.0)
Syntax
C#
[SerializableAttribute]
public sealed class Icon : ISerializable, ICloneable, 
	IDisposable

The Icon type exposes the following members.

Constructors
  NameDescription
Public methodIcon(Stream)
Initializes a new instance of the Icon class from the specified data stream.
Public methodIcon(String)
Initializes a new instance of the Icon class from the specified file name.
Public methodIcon(Stream, Size)
Initializes a new instance of the Icon class of the specified size from the specified stream.
Public methodIcon(String, Size)
Initializes a new instance of the Icon class of the specified size from the specified file.
Public methodIcon(Type, String)
Initializes a new instance of the Icon class from a resource in the specified assembly.
Public methodIcon(Icon, Size)
Initializes a new instance of the Icon class and attempts to find a version of the icon that matches the requested size.
Public methodIcon(Stream, Int32, Int32)
Initializes a new instance of the Icon class from the specified data stream and with the specified width and height.
Public methodIcon(String, Int32, Int32)
Initializes a new instance of the Icon class with the specified width and height from the specified file.
Public methodIcon(Icon, Int32, Int32)
Initializes a new instance of the Icon class and attempts to find a version of the icon that matches the requested size..
Properties
  NameDescription
Public propertyHandle
Gets the handle for this Icon. This is not a copy of the handle; do not free it.
Public propertyHeight
Gets the height of this Icon.
Public propertySize
Gets the size of this Icon.
Public propertyWidth
Gets the width of this Icon.
Methods
  NameDescription
Public methodClone
Clones the Icon, creating a duplicate image.
Public methodDispose
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
Public methodEquals (Inherited from Object.)
Public methodStatic memberExtractAssociatedIcon
Returns an icon representation of an image that is contained in the specified file.
Public methodStatic memberFromHandle
Creates a GDI+ Icon from the specified Windows handle to an icon (HICON).
Public methodGetHashCode (Inherited from Object.)
Public methodGetType (Inherited from Object.)
Public methodSave
Saves this Icon to the specified output Stream.
Public methodToBitmap
Converts this Icon to a GDI+ Bitmap.
Public methodToString
Gets a human-readable string that describes the Icon.
(Overrides ObjectToString.)
See Also