Change icon created by exe

I am creating an executable with VB.NET using CodeDomProvider.

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

+1
source share
3 answers

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

Dim parameters As New CompilerParameters()
parameters.CompilerOptions = "/win32icon:C:\full\path\to\icon.ico"

Then you pass these parameters to the CompileAssemblyFromSource method . The generated exe will use the specified icon as the icon of its application.

+3
source

Go to the project properties and select the icon. Just like that.

0
0
source

All Articles