tags:

views:

433

answers:

2

I'm generating an executable file with VB 2008 using codeDom Compiler

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

thanks

A: 

Go into the project properties and select the icon from there. Simple as that.

gmcalab
man, i have an VB 2008 application with a textbox. There i wrote some VB code and when i press GENERATE, the application use codeDom Compiler and generates an exe with that code from the textbox.The file is an exe with an exe icon, and i want to change it somehow.it's not just a Icon property of an form or application
Lullly
+1  A: 

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:\full\path\to\icon.ico"

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

adrianbanks
thanks man, i will try now to see if it worksLE: it works perfect, thanks a lot man
Lullly