Assign icons to forms?

Discussion in 'Questions (Windows Mobile)' started by BjornF, Feb 25, 2008.

  1. BjornF

    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
     
  2. Erel

    Erel Administrator Staff Member Licensed User

  3. BjornF

    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
     
  4. TomasNM

    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.
     
  5. Cableguy

    Cableguy Expert Licensed User

    The form should take the apps icon as default...
    After compiling that is..
     
  6. BjornF

    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
     

    Attached Files:

  7. agraham

    agraham Expert Licensed User

    It is. It's not a problem as such, I just didn't implement that. I'll look into it.
     
  8. agraham

    agraham Expert Licensed User

    Version 1.4 of FormExDesktop supporting a Form icon.

    New write-only property "Icon". Use as

    Code:
    FormEx1.Icon = AppPath & "\anicon.ico"
     

    Attached Files:

    Last edited: Feb 25, 2008
  9. TomasNM

    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.
     
  10. taximania

    taximania Well-Known Member Licensed User

    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: Feb 25, 2008
  11. BjornF

    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
     
  12. TomasNM

    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...
     
  13. agraham

    agraham Expert Licensed User

    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".
     
Loading...