Assign icons to forms?

BjornF

Active Member
Licensed User
Dear All,

Is there a way to get Windows (the desktop version ;)) to show a specific icon (instead of a generic one) on the task bar when your program is running?

I seem to remember that in VB you could assign an icon to a form and then that icon was shown.

All the best / Björn
 

BjornF

Active Member
Licensed User
No, not as far as I can see unfortunately. Is it something which would be difficult to add? / Björn
 

TomasNM

Member
...

I think,there should be a possible way to change the icon(resource) with 3rd party software such as PEExplorer or Resource Tuner.
 

BjornF

Active Member
Licensed User
Dear Cableguy,

Hmm, very strange :confused: - when I use the native Basic4ppc forms then the icon is used just like you say and shows up on the taskbar. The program I am currently working on uses the FormExDesktop however, it might be that the problem is related to that?

Has anyone else seen this behaviour?


Dear TomasNM, thank you for your suggestions but I think that looks a little bit too advanced for my taste - I was hoping for a simpler solution.


all the best / Björn
 

Attachments

TomasNM

Member
...

Using resource editor is not so difficult,as it seems. Simply open your compiled exefile with kind editor and change the icon using that software. Nothing difficult,realy. I will try to get some editor,I'll let you know and I'll write step by step tutorial how-to. Of course,if it will work. Anyway I think,that should do.
 

taximania

Well-Known Member
Licensed User
Using resource editor is not so difficult,as it seems. Simply open your compiled exefile with kind editor and change the icon using that software. Nothing difficult,realy. I will try to get some editor,I'll let you know and I'll write step by step tutorial how-to. Of course,if it will work. Anyway I think,that should do.
I've just used ResHacker to replace the .ico in an optimized compiled desktop app.
{The new icon is visible in Windows Explorer}
When I run the app, the original .ico is still visible in the app and taskbar, if I load the hacked app back into ResHacker, the original .ico is not there ?????

I've just used ResHacker to replace the .ico in a non optimized compiled desktop app.
{The new icon is not visible in Windows Explorer}
When I run the app, the original .ico is still visible in the app and taskbar, if I load the hacked app back into ResHacker, the original .ico is not there ?????

Which i found rather strange :sign0137:
 
Last edited:

BjornF

Active Member
Licensed User
Dear agraham,

many thanks for the rapid solution. This makes the program look even better!

all the best / Björn
 

TomasNM

Member
...

Oh,as I found now,the exefile has no resources to replace,as ResourceTuner said. Maybe it is not so good soft to do that. But usualy this way you can change anything,including bitmaps,texts,menus etc. My opinion is also,when you change icon as resource,the program icon should be the same. Strange...
 

agraham

Expert
Licensed User
Which i found rather strange :sign0137:
Windows caches icons for apps so that it does not need to reread the icons for all the files at every startup. Once a file has an icon in the cache Windows doesn't seem to want to reread it. You can delete the icon cache and Windows will then rebuild it. Google for "Windows icon cache", there's a lot about it out there.

To clear the icon cache in XP make sure you can view hidden files and then open your Windows directory in Explorer and delete the file called "ShellIconCache".

In Vista each user has his own icon cache. To clear the icon cache in Vista make sure you can view hidden files and then open the "local " folder in your user folder \Users\USERPRNAME\AppData\Local and delete the file called "IconCache.db".
 
Top