Question

I have a project exe file that I had made for a friend long time ago, now the same program is needed but with slight modifications to the code, I have used Code Reflect to decompile the exe file and recovered the MS VisualStudio solution file. Now the problem is that the project resource files have not been recovered successfully and I want to change the MainForm icon. The form source code is available but the designer gives errors, that is not a problem because I only need to change a few lines of code in it. How can I change the form icon?

Was it helpful?

Solution

Set the Icon dropdown in Project properties, and the Icon property of the form.

Found a solution: had the same problem...With the idea that my Background image wasn't working until I had it in the Resources. I went to the Form1_load event and added the following code:

System.Drawing.Icon ico = Properties.Resources.Untitled;
this.Icon = ico;

As "Properties.Resources.Untitled" being my icon that I added to my Resources.

And now seems to be workings as wanted.

OTHER TIPS

You can use Resource Hacker to change the icon of an executable. Download it from: http://www.angusj.com/resourcehacker/

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top