473,403 Members | 2,366 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,403 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 2319
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
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.