|
code
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Change ICON automatically at build timeOK, I've an application that produces two executables based on a
compile (build) time setting. I use conditionals to control things like string values, etc. (Think of this as a multi-language application--it isn't but that model works). I want each of the two versions ot have a different icon. I can save an icon in the resources, but until the program runs, they have the icon that is set in the main form as the applicaiton's icon. So when using Windows Explorer one sees the wrong icon for one of the two builds. Is there a way with conditional building to set the icon that is the main form's (or application's) icon? (VB6...) "PeterD" <pet***@hipson.net> wrote in message I've only had to do this once... but, what I did was create 2 separate news:1dptk3h7itst93srhcqpg8im97kqqvpjtk@4ax.com... > OK, I've an application that produces two executables based on a > compile (build) time setting. I use conditionals to control things > like string values, etc. (Think of this as a multi-language > application--it isn't but that model works). project files (vbp's). It actually turned out to be fairly easy. Especially since I also set the conditional compile variables to different values in both projects... I found it easier to open a separate project, than it was to remember to set the conditionals <g> The name of your compiled component is completely independant of the VBPs name, so it's fairly easy to maintain. fwiw, I kept both VBPs in the same folder and source safe project. -- Ken Halter - MS-MVP-VB - Please keep all discussions in the groups.. In Loving Memory - http://www.vbsight.com/Remembrance.htm On Thu, 29 Nov 2007 08:34:18 -0800, "Ken Halter"
<Ken_Halter@Use_Sparingly_Hotmail.com> wrote: Show quote >"PeterD" <pet***@hipson.net> wrote in message Ken, good suggestion... I probably can do that without much trouble at>news:1dptk3h7itst93srhcqpg8im97kqqvpjtk@4ax.com... >> OK, I've an application that produces two executables based on a >> compile (build) time setting. I use conditionals to control things >> like string values, etc. (Think of this as a multi-language >> application--it isn't but that model works). > >I've only had to do this once... but, what I did was create 2 separate >project files (vbp's). It actually turned out to be fairly easy. Especially >since I also set the conditional compile variables to different values in >both projects... I found it easier to open a separate project, than it was >to remember to set the conditionals <g> > >The name of your compiled component is completely independant of the VBPs >name, so it's fairly easy to maintain. fwiw, I kept both VBPs in the same >folder and source safe project. all. Actually an improvement, really over what I'm doing now. PeterD wrote:
> Is there a way with conditional building to set the icon that is the The (now) free vbAdvance add-in supports an AppIconFile entry in VBP files. You > main form's (or application's) icon? could conceivably automate the builds at the command line, using your favorite textfile manipulation tool to change this value as needed. On Thu, 29 Nov 2007 11:33:41 -0800, "Karl E. Peterson" <k***@mvps.org> I implemneted Ken's suggestion and it works well for me. I created twowrote: >PeterD wrote: >> Is there a way with conditional building to set the icon that is the >> main form's (or application's) icon? > >The (now) free vbAdvance add-in supports an AppIconFile entry in VBP files. You >could conceivably automate the builds at the command line, using your favorite >textfile manipulation tool to change this value as needed. (blank) forms to hold just the icons, and changed each project to point the the correct form. PeterD wrote:
Show quote > On Thu, 29 Nov 2007 11:33:41 -0800, "Karl E. Peterson" <k***@mvps.org> That's probably a cleaner answer, in this case, yeah.> wrote: > >> PeterD wrote: >>> Is there a way with conditional building to set the icon that is the >>> main form's (or application's) icon? >> >> The (now) free vbAdvance add-in supports an AppIconFile entry in VBP files. You >> could conceivably automate the builds at the command line, using your favorite >> textfile manipulation tool to change this value as needed. > > I implemneted Ken's suggestion and it works well for me. I created two > (blank) forms to hold just the icons, and changed each project to > point the the correct form. |
|||||||||||||||||||||||