Icon Constructor (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.
Assembly: System.Drawing (in System.Drawing.dll)
The following code example demonstrates how to use the ToBitmap method. This example is designed to be used with Windows Forms. Create a form and paste the following code into it. Call the IconToBitmap method in the form's Paint event handler, passing e as PaintEventArgs.
Available since 1.1