Ok,

I finally finish my application. It has a textfile in the resources folder of the solution that the application constantly accesses.

My question is:

I want to build an exe for my application that I can run in any computer.
I want to apply an icon to this .exe file, not the forms in the file, but the .exe file itself, i don't know if it is possible.

The problem is
I don't know how to add the icon when I build the solution.
If I change the .exe file from the debug folder it crashes when it tries to access the textfile.

What can I do?

Thanks in advance.

For the icon of the application, all you need is an ".ico" file.

Right click on your project, select "properties" and in the "Application" tab you can set an Icon file.

Then, before using your application in any other computer, you have to run a "RELEASE" not a "DEBUG".

It will build an EXE file with the resource (icon) inside it.

There are websites online, that will convert a PNG to ICO and you can use that.

Hope it helps

commented: Good advice! +9

Just to add:
In the Build menu you will find the Publish item, that starts a wizard.

Hi, i found the solution with the icon, with the resource folder, I guess I need ot create a resource file and access the text file that way, because installing the application in the program files directory will make windows block the access to the textfile.

Thanks

Don't see how you would access a text file via a resourcefile.
And for securiy reasons access to the program Files folder is limited.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.