473,287 Members | 1,413 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,287 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 2307
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: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: marcoviolo | last post by:
Dear all, I would like to implement on my worksheet an vlookup dynamic , that consider a change of pivot excel via win32com, from an external excel (without open it) and save the new file into a...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...

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.