生成的exe的更改图标图标、exe

由网友(局外人)分享简介:我用codeDomProvider生成的可执行文件与VB.NET。I'm generating an executable file with VB.NET using CodeDomProvider.有没有办法更改图标前的编译器创建的exe文件?Is there a way to change the icon...

我用codeDomProvider生成的可执行文件与VB.NET。

I'm generating an executable file with VB.NET using CodeDomProvider.

有没有办法更改图标前的编译器创建的exe文件?

Is there a way to change the icon before the compiler creates the exe file?

推荐答案

您可以设置生成的exe由的 CompilerParameters 的那 你传递给code供应商,使用 CompilerOptions 属性。

You can set the icon of the generated exe by specifying it in the CompilerParameters that you pass to the code provider, using the CompilerOptions property.

Dim parameters As New CompilerParameters()
parameters.CompilerOptions = "/win32icon:C:fullpathtoicon.ico"

您再通过这些参数的 CompileAssemblyFromSource 方法。然后,生成的exe将使用指定的图标,它的应用程序图标。

You then pass these parameters to the CompileAssemblyFromSource method. The generated exe will then use the specified icon as its application icon.

阅读全文

相关推荐

最新文章