By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
457,978 Members | 1,019 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 457,978 IT Pros & Developers. It's quick & easy.

multiple icons

P: n/a
I have wrote a c# app and included the default app.ico file and then
compliled it.

When I create a shortcut to the application on the destop, I would like the
option of selecting from a choice of icons that are built into the file.

How do I include the icons in my application for this to work?

Thanks

Slasher Stanley
Nov 16 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Make sure the icon is included in the project. If it doesn't show in the
project explorer, right click the project file, select add existing item,
then browse to the icon file. Next, set the build action property of the
icon file to Embedded Resource.

To programatically set the icon file as the form file for the main form, use
the following code, either in the form constructor or wherever else in your
code you choose to set the icon.

this.Icon = new Icon(GetType(),"myIcon.ico");

Hope this helps,

Dale

"SlasherStanley" <as@ss.com> wrote in message
news:iCfec.482$nG1.462@newsfe1-win...
I have wrote a c# app and included the default app.ico file and then
compliled it.

When I create a shortcut to the application on the destop, I would like the option of selecting from a choice of icons that are built into the file.

How do I include the icons in my application for this to work?

Thanks

Slasher Stanley

Nov 16 '05 #2

P: n/a
Sorry I was not clear enough.

My application is compiled and does show the icon(app.ico).

If I create a windows shortcut to it, and then view the properties of the
shortcut, I have the option to change the icon. Unfortunatley the only icon
that my executable has is the one that is shown from app.ico.

I would like my compiled program to have mutliple icons within, so that I
can select from several icons on the shortcut.

Thanks for your help so far.

Alan

"DalePres" <don-t-spa-m-me@lea-ve-me-a-lone--.com> wrote in message
news:#s**************@TK2MSFTNGP11.phx.gbl...
Make sure the icon is included in the project. If it doesn't show in the
project explorer, right click the project file, select add existing item,
then browse to the icon file. Next, set the build action property of the
icon file to Embedded Resource.

To programatically set the icon file as the form file for the main form, use the following code, either in the form constructor or wherever else in your code you choose to set the icon.

this.Icon = new Icon(GetType(),"myIcon.ico");

Hope this helps,

Dale

"SlasherStanley" <as@ss.com> wrote in message
news:iCfec.482$nG1.462@newsfe1-win...
I have wrote a c# app and included the default app.ico file and then
compliled it.

When I create a shortcut to the application on the destop, I would like

the
option of selecting from a choice of icons that are built into the file.

How do I include the icons in my application for this to work?

Thanks

Slasher Stanley


Nov 16 '05 #3

P: n/a
That is a good question. I just checked one of my apps that I have 10 icons
in, and they all get used in the app, but only the app icon shows up in
shortcut properties. Yet the older VB version shows all 10 icons in
shortcut properties. Guess I just never noticed that before.

I'll be waiting to see the answers you get as well.

Dale

"SlasherStanley" <as@ss.com> wrote in message
news:17lec.702$nG1.163@newsfe1-win...
Sorry I was not clear enough.

My application is compiled and does show the icon(app.ico).

If I create a windows shortcut to it, and then view the properties of the
shortcut, I have the option to change the icon. Unfortunatley the only icon that my executable has is the one that is shown from app.ico.

I would like my compiled program to have mutliple icons within, so that I
can select from several icons on the shortcut.

Thanks for your help so far.

Alan

"DalePres" <don-t-spa-m-me@lea-ve-me-a-lone--.com> wrote in message
news:#s**************@TK2MSFTNGP11.phx.gbl...
Make sure the icon is included in the project. If it doesn't show in the project explorer, right click the project file, select add existing item, then browse to the icon file. Next, set the build action property of the icon file to Embedded Resource.

To programatically set the icon file as the form file for the main form,

use
the following code, either in the form constructor or wherever else in

your
code you choose to set the icon.

this.Icon = new Icon(GetType(),"myIcon.ico");

Hope this helps,

Dale

"SlasherStanley" <as@ss.com> wrote in message
news:iCfec.482$nG1.462@newsfe1-win...
I have wrote a c# app and included the default app.ico file and then
compliled it.

When I create a shortcut to the application on the destop, I would like
the
option of selecting from a choice of icons that are built into the

file.
How do I include the icons in my application for this to work?

Thanks

Slasher Stanley



Nov 16 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.