>We have a framework that is compiled into exe. We then Set Proc to this exe and Set Classlib to ... In theExe so we can we find all our programs and class libraries.
>
>The problem.
>In the base form we have code that assigns the icon of the form based on an application property:
>
>ThisForm.Icon = goApplication.cIcon
>
>In the application exe we have bound in the icon file and set the goApplication.cIcon property.
>
>When we distribute both exe's the icon does not display correctly. I have worked around this by binding the specific icon file into the framework exe. It appears that because the assignment of the icon property is inside the framework exe, the icon needs to be inside that exe file.
>
>Is this correct? We do not really want to have to put the application specific icon file into our framework project. Any ideas?
If you aren't launching the app by directly clicking on the executable, but use shortcuts instead, you can associate icons from files with a shortcut in a fairly simple and straightforward fashion - it's now just an issue of creating the shortcut with the proper icon association. Both the Wscript.Shell Object's CreateShortcut method from the WSH COM object, and George Tasker's LNKFILES, can specify an icon to use in conjunction with creating a shortcut.