all groups > visual studio .net ide > august 2007 >
You're in the

visual studio .net ide

group:

Adding Icons to VS2005 Exe's and Shortcuts


Adding Icons to VS2005 Exe's and Shortcuts MarcG
8/21/2007 4:38:11 PM
visual studio .net ide:
Is there a HowTo for doing this? I have a solution with six projects in it,
each generating an Exe. My MSI puts entries in the start menu. I've managed
to get Icons on each shortcut, but I'm having trouble with the main forms and
taskbar. Some of my programs put their icons on the task bar and others
don't. Some show icons on the form some don't.

The parameters that control this are spread out across a variety of property
sheets (project, form, and deployment, so I'm sure I'm missing the
differences, but they have to be there somewhere.

I think that part of the problem relates to 16x16 and 32x32 icons. The icon
editor seems to only show one of the icons that are in the icon file.

On a scale of 1 to ten, this isn't a big deal, but it is a little
embarassing when my customer comments on it.

Thx
RE: Adding Icons to VS2005 Exe's and Shortcuts v-wywang NO[at]SPAM online.microsoft.com
8/22/2007 12:00:00 AM
Hello Marc,

According to your description, you want to know how to set icon for Winform
application.
Please correct me if I misunderstood anything.

The "Icon" property of the Form controls is used to display on the
Taskbar(16x16), Main Form(16x16) and Task Switcher(32x32).
The icon(32x32) that is associated with the final executable that your
project generates is configured via the "Properties" option in the
"Project" menu.

As you have seen, there are two formats (16x16 and 32x32) in each icon file.
Taskbar and Main From use 16 bit icon.
.exe file and Task Switcher use 32 bit icon.

For the issue that "some of your programs put their icons on the task
bar/main form and others don't", please check the 16x16 format in your icon
file that you set in the "Icon" property of the Form Control.

By the way, VS 2005 could not edit 16 bit icon. To edit 16 bit icon, you
may try some third party tool. (such as Paint Express)
http://www.slavasoft.com/paintexpress/index.htm

Hope this helps. Please try the above method and let me know if this works
on your side. I'm glad to assist you.
Best regards,

Wen Yuan
Microsoft Online Community Support
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
RE: Adding Icons to VS2005 Exe's and Shortcuts v-wywang NO[at]SPAM online.microsoft.com
8/24/2007 12:00:00 AM
Hello Marc,

This is Wen Yuan again. I haven't heard from you about a couple of days.
Have you resolved the issue so far? I just want to check if you have
anything unclear.
Please don't hesitate to let me know if you have any further issue.
It's my pleasure to assist you.

Have a great day.
Best regards,

Wen Yuan
Microsoft Online Community Support
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
RE: Adding Icons to VS2005 Exe's and Shortcuts MarcG
8/28/2007 1:32:26 PM
Wen Yuan,

Sorry - I got pulled off onto some other work. I appreciate your following
up. Still no luck. Here's what I've found.

First, the problem is hard to track because VS seems to be caching some
stuff and it doesn't notice the change to an icon file, so when I did a new
test, I got no change. I went back and deleted all the build products,
rebuilt and then got different behaviour (without having changed any of the
source files).

Second, I'm not sure what you mean by not being able to create 16x16 icons
in VS2005. When you are editing an icon, a right click brings up a menu with
two relevant entries "New Icon Image Type" and "Current Icon Image Types".
Clicking on the first lets you select from a range of dimensions and color
depths. Clicking on the second shows the ones you currently have in the file.
Why they simply didn't show all the existing ones in the left pane is beyond
me.

In any case, I went and checked that the two forms I was using had identical
property sheets. Note that in both cases, the Icon property was empty.
Selecting an icon here seems to make no difference.

I have selected the proper icon and specified it on each of the project
property sheets.

In my shortcuts, I also selected the related icon files.

I then build and install the package that contains all my EXEs.

On the start menu, all entries show their (small) icons.

When I drag any of the exe's from the install directory to the desktop and
select "create shortcut" they all are rendered with their large icons.

So it looks like I do in fact have both sizes in the file.

When I run one of the tasks, it does not show any icon in the top left
corner of its title bar. It shows up as the default empty blue and white form
icon on the task switcher. However, on the task bar, it shows its proper icon.

When I run the other task, it shows the standard red, blue, and yellow icon
in the left end of its title bar and also on the task bar and the task
switcher.

Hope all this means something to you - it doesn't to me. I can send you some
screen shots if that will help.

Thx
RE: Adding Icons to VS2005 Exe's and Shortcuts v-wywang NO[at]SPAM online.microsoft.com
8/29/2007 1:05:39 PM
Hello Marc,
Thanks for your reply.

[quoted text, click to view]
VS2005.
I'm sorry, I misunderstood this before. I always use 3rd party tool to edit
icon. Thanks for your information.

[quoted text, click to view]
corner of its title bar. It shows up as the default empty blue and white
form icon on the task switcher. However, on the task bar, it shows its
proper icon.

Would you please send me a screen shot and Icon file which you used in this
task?
In order to narrow down the issue, I will use this Icon file to reproduce
the issue on my side. The screen shot will also help on analysis very much.
My alias is v-wywang@microsoft.com. thanks.

I'm looking forward to your reply. Have a great day.
Best regards,

Wen Yuan
Microsoft Online Community Support
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
AddThis Social Bookmark Button