本文介绍了从.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) 以下代码不是我的拥有但是一旦你将图标保存为变量就会工作。 来源: stackoverflow/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: stackoverflow/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);
请查看有关击球员信息的链接 www.nirsoft/utils/iconsext.html [ ^ ] 点击此处下载图标提取器 www.nirsoft/utils/iconsext.zip [ ^ ] kindly check the link for batter information www.nirsoft/utils/iconsext.html[^] click here to download icon extractor www.nirsoft/utils/iconsext.zip[^]
更多推荐
从.exe中提取图标
发布评论