View Full Version : Put an icon on an EXE? (was: HELP!!)
Eisner664
26-04-2006, 09:02
OK i know this is a robotics website, but i knew that you guys would be the perfect people to ask, does anyone know how to put an icon on an executable file, i made a first icon, and i want tto put it on an executable file
Jack Jones
26-04-2006, 10:29
Not knowing what programing environment you're using, here's a couple of suggestions that may give you a clue...
Also - Try Googling "ICON DISCARDABLE" you may hit on one for your environment.
Here's a way to do it in Visual C++ (http://www.thecodeproject.com/gdi/replaceicon.asp?print=true)
In Borland BCC32:
Make a 16x16 Windows icon image (IrfanView has that save_as):
your_icon.ico
Make a resource file your_resource.rc that says:
IDI_ICON1 ICON DISCARDABLE "your_icon.ico"
If you're using TMAKE to create your makefile, put this at the start of your_program.pro:
RC_FILE = your_resource.rc
NOTE: THat's all you should need to do. TMAKE then automagiacally generates the makefile to contain the highlighted items (included just in case you want to hardwire the makefile - good luck)
!if !$d(BCB)
BCB = $(MAKEDIR)\..
!endif
...
LFLAGS = -L$(BCB)\lib -c -x -Gn -aa -Tpe c0w32.obj
LIBS = import32.lib $(QTDIR)\lib\qt.lib cw32.lib , , your_resource.res
...
all: $(TARGET)
$(TARGET): $(UICDECLS) $(OBJECTS) $(OBJMOC) your_resource.res
$(LINK) @&&|
$(LFLAGS) $(OBJECTS) $(OBJMOC), $(TARGET),,$(LIBS)
|
your_resource.res: your_resource.rc
brcc32 your_resource.rc
coldabert
26-04-2006, 11:43
Yeah. It really depends on the developement enviroment that you're using. It's also possible to edit the hex on the exe but this can become complicated. Feel free to PM or email me if you would like some more guidance on this topic.
-Cole
Good luck to all teams in Atlanta!
KenWittlief
26-04-2006, 11:52
I think he's talking about an icon for the windows desktop or directorys? How do you create a new icon for a widows (.exe) program and attach it?
coldabert
26-04-2006, 14:11
It's easy to change a shortcut's icon.
1. Rightclick and select properties
2. make sure the "shortcut" tab is opened
3. At the bottom right, select "Change Icon..."
4. Select one of those, or "Browse" to a custom one.
The icon associated with a (EXE) program is usually built into the EXE file.
vBulletin® v3.6.4, Copyright ©2000-2017, Jelsoft Enterprises Ltd.