Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Visual Studio.NET / IDE / August 2007

Tip: Looking for answers? Try searching our database.

Adding Icons to VS2005 Exe's and Shortcuts

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
MarcG - 22 Aug 2007 00:38 GMT
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
Marc
WenYuan Wang [MSFT] - 22 Aug 2007 12:52 GMT
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.
WenYuan Wang [MSFT] - 24 Aug 2007 12:53 GMT
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.
MarcG - 28 Aug 2007 21:32 GMT
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
Marc
WenYuan Wang [MSFT] - 29 Aug 2007 14:05 GMT
Hello Marc,
Thanks for your reply.

> I'm not sure what you mean by not being able to create 16x16 icons in
VS2005.
I'm sorry, I misunderstood this before. I always use 3rd party tool to edit
icon. Thanks for your information.

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

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.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.