从.exe中提取图标 [英] Extract icon from .exe

查看:88
本文介绍了从.exe中提取图标的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

此问题与我的上一个问题有关。

我是使用openFileDialog浏览到.exe并在应用程序内部的指定文件夹中创建一个快捷方式。



我现在正在尝试保存的图标以jpeg或任何其他格式复制到文件夹中。



我这样做是因为我将图标的路径存储到我的数据库中,还将示例图标保存到我在应用程序中创建的文件夹中。



再次提前感谢!

This issue is related to my previous question.
I''m browsing to the .exe with the openFileDialog and create a shortcut into a designated folder inside the aplication.

What I''m now trying is to save the icon of that aplication into a folder as a jpeg or any other format.

I''m doing this because I''m storing the path of the icon into my database, and also saving the sample icon into a folder I created inside the aplication.

Thanks in advance once again!

推荐答案

图标结果= Icon.ExtractAssociatedIcon(filePath)







以下代码不是我的拥有但是一旦你将图标保存为变量就会工作。

来源: http://stackoverflow.com/questions/5925069/save-icon-file-to-hard-drive [ ^ ]

Icon result = Icon.ExtractAssociatedIcon(filePath)



The below code is not my own but will work once you have the icon saved as a variable.
Credit: http://stackoverflow.com/questions/5925069/save-icon-file-to-hard-drive[^]
string s = Environment.GetFolderPath(Environment.SpecialFolder.Desktop) + @"\IconData.ico";
using (FileStream fs = new FileStream(s, FileMode.Create))
    ico.Save(fs);


请查看有关击球员信息的链接

http://www.nirsoft.net/utils/iconsext.html [ ^ ]





点击此处下载图标提取器

http://www.nirsoft.net/utils/iconsext.zip [ ^ ]
kindly check the link for batter information
http://www.nirsoft.net/utils/iconsext.html[^]


click here to download icon extractor
http://www.nirsoft.net/utils/iconsext.zip[^]


这篇关于从.exe中提取图标的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆