473,383 Members | 1,885 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,383 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 1759
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.
1
by: Jake Wharton | last post by:
Right now i have embedded an icon file in my project with 6 different individual icons in it. I currently use Bitmap icon = new Bitmap(this.GetType(), "App.ico"); to load in the icon but it...
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...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...

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.