Bitmap in Icon konvertieren
/// <summary>
/// Converts the bitmap to icon.
/// </summary>
/// <param name="bmp">The BMP.</param>
/// <param name="path">The path.</param>
private static void ConvertBitmapToIcon(Bitmap bmp, string path)
{
Icon ico = Icon.FromHandle(bmp.GetHicon());
FileStream fs = new FileStream(path, FileMode.OpenOrCreate);
ico.Save(fs);
fs.Close();
}
Kommentare zum Snippet