C#exe程序获取图像并复制自身并将图像嵌入到一个单独的exe文件中。 [英] C# exe program takes an image and copies itself and embeds image into one single exe file.

查看:60
本文介绍了C#exe程序获取图像并复制自身并将图像嵌入到一个单独的exe文件中。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,

如果我需要编写一个带有图像的c#应用程序(或其他文件本身显示)。如何添加功能,使该应用程序生成自己的副本与嵌入在该exe副本中的所选图像(或其他文件)?

之后,新生成的exe必须加载嵌入的图像当它打开时。

Hello,
If I need to write a c# application that takes an image (or other file to display in itself). How to add the functionality to make that app produce a copy of itself with the selected image (or other file) embedded in that copy of exe?
After that, The new produced exe must load the embedded image when it is opened.

推荐答案

实际上将图像数据嵌入到exe中是一个不好的主意:在许多(如果不是全部)情况下,这将被视为可能是病毒活动通过病毒扫描程序。此外,这意味着实际软件版本的版本控制将成为一个完整的噩梦。

相反,为什么不将它保持独立,并提供应用程序始终引用的特定文件名,或者配置文件中文件的路径?



这样更简单,更安全......
Actually embedding the image data into the exe is a poor idea: in many (if not all) cases, that will be considered as "probably virus activity" by virus scanners. In addition, it means that the version control of actual software revisions gets to be a complete nightmare.
Instead, why not keep it separate, and either provide a specific file name which your application always references, or a path to the file in a configuration file?

It's a lot simpler, and a lot safer...


这篇关于C#exe程序获取图像并复制自身并将图像嵌入到一个单独的exe文件中。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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