IconExtensionsSaveAsIcon Method
Saves the
icon into the specified
stream. Unlike
Icon.Save, this method can save every icon with high quality, even
SystemIcons members, and icons created by the
Icon.FromHandle method.
Namespace: KGySoft.DrawingAssembly: KGySoft.Drawing (in KGySoft.Drawing.dll) Version: 10.0.0-rc.1
public static void SaveAsIcon(
this Icon icon,
Stream stream,
bool forceUncompressedResult = false
)
<ExtensionAttribute>
Public Shared Sub SaveAsIcon (
icon As Icon,
stream As Stream,
Optional forceUncompressedResult As Boolean = false
)
public:
[ExtensionAttribute]
static void SaveAsIcon(
Icon^ icon,
Stream^ stream,
bool forceUncompressedResult = false
)
[<ExtensionAttribute>]
static member SaveAsIcon :
icon : Icon *
stream : Stream *
?forceUncompressedResult : bool
(* Defaults:
let _forceUncompressedResult = defaultArg forceUncompressedResult false
*)
-> unit
- icon Icon
- The icon to save
- stream Stream
- A stream into which the icon has to be saved.
- forceUncompressedResult Boolean (Optional)
- to force saving an uncompressed icon;
to allow PNG compression, which is supported by Windows Vista and above. This parameter is optional.
Default value: .
In Visual Basic and C#, you can call this method as an instance method on any object of type
Icon. When you use instance method syntax to call this method, omit the first parameter. For more information, see
Extension Methods (Visual Basic) or
Extension Methods (C# Programming Guide).