473,503 Members | 939 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Missing Icons With EXE

I have an application (.exe) that is running in the system tray. When a
message arrives: the icon in the system tray is to change so that the user
knows a message has arrived.

My question is: how can I deploy .ico files with an application? I would
like to just send the people the .exe file and they can run that on their
computer. Is this possible? What code would I need to ensure this?

This works locally on my machine, but I have the paths hardcoded for
testing.

Thanks for any help
Andy
Nov 17 '05 #1
4 1665
Andy wrote:
I have an application (.exe) that is running in the system tray. When a
message arrives: the icon in the system tray is to change so that the user
knows a message has arrived.

My question is: how can I deploy .ico files with an application? I would
like to just send the people the .exe file and they can run that on their
computer. Is this possible? What code would I need to ensure this?

This works locally on my machine, but I have the paths hardcoded for
testing.

Thanks for any help
Andy


You can compile the icons into to your app as a resource and then
accessing the icons with a System.Resources.ResourceManager
Nov 17 '05 #2
Tyron:

Thank you for the post. I added the icon files and compiled it as a
resource object, but I am having a little problem with the code accessing the
files.

System.Resources.ResourceManager rm = new
System.Resources.ResourceManager(typeof(System.Dra wing.Icon));
notifyIcon.Icon = (System.Drawing.Icon)rm.GetObject("red.ico");

What am I doing wrong?

Thanks
Andy

"Tyron Madlener" wrote:
Andy wrote:
I have an application (.exe) that is running in the system tray. When a
message arrives: the icon in the system tray is to change so that the user
knows a message has arrived.

My question is: how can I deploy .ico files with an application? I would
like to just send the people the .exe file and they can run that on their
computer. Is this possible? What code would I need to ensure this?

This works locally on my machine, but I have the paths hardcoded for
testing.

Thanks for any help
Andy


You can compile the icons into to your app as a resource and then
accessing the icons with a System.Resources.ResourceManager

Nov 17 '05 #3
Thank you for the response. I added the icon files as resources, however:
for some reason I am not able to access them in the code.

System.Resources.ResourceManager rm = new
System.Resources.ResourceManager(typeof(System.Dra wing.Icon));
notifyIcon.Icon = (System.Drawing.Icon)rm.GetObject("red.ico");

Any idea what I might be doing wrong?

Thanks

"Tyron Madlener" wrote:
Andy wrote:
I have an application (.exe) that is running in the system tray. When a
message arrives: the icon in the system tray is to change so that the user
knows a message has arrived.

My question is: how can I deploy .ico files with an application? I would
like to just send the people the .exe file and they can run that on their
computer. Is this possible? What code would I need to ensure this?

This works locally on my machine, but I have the paths hardcoded for
testing.

Thanks for any help
Andy


You can compile the icons into to your app as a resource and then
accessing the icons with a System.Resources.ResourceManager

Nov 17 '05 #4
On Tue, 12 Apr 2005 12:27:24 -0700, "Andy"
<An**@discussions.microsoft.com> wrote:
Thank you for the response. I added the icon files as resources, however:
for some reason I am not able to access them in the code.

System.Resources.ResourceManager rm = new
System.Resources.ResourceManager(typeof(System.Dr awing.Icon));
notifyIcon.Icon = (System.Drawing.Icon)rm.GetObject("red.ico");

Any idea what I might be doing wrong?

Thanks


System.ComponentModel.ComponentResourceManager resources = new
System.ComponentModel.ComponentResourceManager(typ eof(frmFormName));

this.toolStripButton1.Image =
((System.Drawing.Image)(resources.GetObject("toolS tripButton1.Image")));

Whidbey beta 2 ctp february 2005

Nov 17 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
1318
by: CodeMonkey | last post by:
Hi all, I hope this isn't a symptom of something more serious, but when I start Visual studio 2003, the icons that used to be shown underneath "installed products from the visual studio family"...
3
246
by: CodeMonkey | last post by:
Hi all, I hope this isn't a symptom of something more serious, but when I start Visual studio 2003, the icons that used to be shown underneath "installed products from the visual studio family"...
1
1199
by: =?Utf-8?B?QnJpYW5L?= | last post by:
I use Xp home SP2. I recently scanned a document and saved to desktop. as i did the save all the desktop icons disappeared,including the scanned dociment. The all reside in the desktop folder...
1
2120
by: vegas26 | last post by:
hi i have a strange behaviour in my treeview control. it shows no more my icons after i did translate my winform into other languages (localized). it still shows the placeholders for the...
0
933
by: =?Utf-8?B?RGVicmEgRA==?= | last post by:
WHEN I REBOOTED MY COMPUTER, MY DESKTOP ICONS ARE MISSING. THE ONLY WAY I CAN GET TO A SCREEN IS BY CTRL - ALT - DEL AND USING 'NEW TASK' . PLZ HELP ASAP. THANKING YOU IN ADVANCE. -- dj
0
7203
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
7282
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
7339
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...
1
5017
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...
0
4678
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3168
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3157
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1515
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
389
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.