The Icon class represents a Windows icon, which is a small transparent bitmap. Just like the Bitmap class, this class is inherited from the Image class.
An application can create an Icon object from a stream, string, icon, icon file, or type by using the Icon class constructors with the size of the icon as an optional parameter. The Icon class provides four read-only properties—Handle, Height, Size, and Width—which return a window handle to the icon, height, size, and width of an icon, respectively.
Listing 7.21 creates an Icon object from an icon file and sets the icon of a form using the Form class’s Icon property.
private void Form1_Load(object sender, ...