473,405 Members | 2,354 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

multiple icons

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
3 2320
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: mts | last post by:
First, let me say that I hope I have selected the correct discussion group for these questions. I would like to display the version (major.minor.build) of my project in the final build. I can...
3
by: SlasherStanley | last post by:
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...
3
by: Tintin | last post by:
Hi all, I Googled without lucky. I want my app has more than one icon like ACDSee or MS Word. Thank in advance.
8
by: Shane Story | last post by:
I would like to embed mutiple icons inside my main exe file so that they can be viewed like Shell32.dll or whatever. Can't figure out how to do this. Sorry if this is in the wrong group. ...
7
by: Siv | last post by:
Hi, I have an MDI application that uses a generic "ShowPage" routine in a module that is called when I want to display a child form. The basic idea is that in the module I have declared each form...
2
by: SharpCoderMP | last post by:
i'm trying to embed multiple program icons in my executable. the only way so far i managed to do that is to embed native win32 resource file with multiple icons. it works, but... when i create a...
4
by: JR | last post by:
Hi, How can I add multible icons into 1 file likeSHELL32.dll from windows it has about 50 Jan
2
by: =?Utf-8?B?QXJuZQ==?= | last post by:
I am able to display an icon for my primary form. Now I need to open secondary forms. Who can I load an icon for a secondary form? -- Arne Garvander Certified Geek Professional Data Dude
1
by: Vivienne | last post by:
Hi there This is a hard problem that I have - I have only been using sql for a couple of weeks and have gone past my ability level quickly! The real tables are complex but I will post a simple...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.