Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Add additional icons with ResHacker.exe
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 10
Network:
Windows Server 2008 R2
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01661225
Message ID:
01661244
Views:
54
>What are you trying to do exactly?
>
>You shouldn't have to hack the EXE just to replace the main icon since that can be configured in the project. As to other icon sizes as Peter mentions you can use multi-page icons that hold all the different sizes you may need in a single icon file. Lots of tools let you create these multi-size icons.
>
>Beyond that I believe if you just embed icons into your project file as support files (images), they will become embedded resources. But not sure how or why that would ever matter.
>
>+++ Rick ---
>
>>I am using ResHacker.exe to add the mainicon to the VFP exe. Now I like to add more icon resources to the same executable, but I did not find any reference in the help how to do it. I played with the parameters like MAINICON and the last parameter set to 1 etc, but nothing seems to work. It would either show the one or the other icon and no clear way how to enumerate both (getting a specific icon based on the ID).
>>
>>
>>...
>>[COMMANDS]
>>-addoverwrite Applic.ico,  ICONGROUP,MAINICON,0
>>
>>
>>Unfortunately all examples show how to replace the main icon, but not how to add additional resources. Has anybody done that before?

The Reshacker was used already since Windows XP when there have been problems with icon resources in VFP. I remember vaguely that the icon file set as project icon was not always compatible with the Windows icon resource and when creating a shortcut on the desktop it would show the default VFP icon instead of the custom icon. I think it had something to do with the colors used in the icons. Not sure if that was pre-Service Pack 2 or if that was solved in Windows, but I let the code in our project builder for the last 10 years and never touched it.

My idea was to change the icon in the Windows taskbar during a long calculation into another icon using Sendmessage() and using the icon resource from the executable. I am not sure if I can use SendMessage when the icon is a physical file or just a file embedded in the exe, but the original code I got was using Extracticon which would use the ID of the icon resource.

Since the calculation can take several minutes, I am trying to show this in the taskbar, so the user can do other productive work without the need to check the program constantly to see if the calculation is finished.
Christian Isberner
Software Consultant
Previous
Reply
Map
View

Click here to load this message in the networking platform