473,666 Members | 2,575 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Icon Trouble in C#

30 New Member
I am having 2 seperate concerns regarding icons in C#.NET 2003

I have an icon that I created in VS. Easily enough I can attach this to a form or system tray object, etc. But if I take the icon and attach it to the system tray icon, it shows up just fine. But the (same) icon I attach to the form doesn't show up correctly, instead looking like the default icon picture. Any idea why this would happen?

Secondly, how does one attach an icon to the .exe? I'm using the installer in .NET to install my program but I don't see a place for the icon.

Thanks.
Sep 19 '07 #1
2 1043
Plater
7,872 Recognized Expert Expert
You are in luck, as I have done a bunch of work figuring out the icon stuff. (Since it's not intuitive)
I wrote an article about it:
http://www.thescripts.com/forum/thread648181.html

The article is pretty poorly written though (sorry!).

The basic thing to know is that when you create an icon in VS it starts out with TWO images stored in it. One is like 16x16 and the other is 32x32 (or 64x64 I forget) And editing one does not effect the other.
So while you made this nice icon in say the "32x32" size, the 16x16 is still the default picture. You can switch to it by right-clicking on the image preview on the left side of the image editor.

To attach the icon to an exe, the "program icon", you need to go to thr project properties and find the icon place where you can list it.
Sep 19 '07 #2
ewokspy
30 New Member
My search fu was obviously weak this time around.

Thank you, that solved all of my icon problems. :D
Sep 19 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

2
3308
by: bob | last post by:
I'm trying to change the icon in the corner of my window, and I'm having trouble. I'm using Dev-C++, and I noticed it created this .RC file for me when I specified that I wanted to use a "Game" icon for the program itself. It contains this: /* THIS FILE WILL BE OVERWRITTEN BY DEV-C++ */ /* DO NOT EDIT! */ A ICON MOVEABLE PURE LOADONCALL DISCARDABLE "reversi.ico"
4
1661
by: yaipa | last post by:
All, I've been asked by my boss to put an Icon in WinXP's "My Computer" for a utility we use around the shop. My tool of choice is of course Python and therefore what I am using to attempt my given task. I have no trouble putting Icons in the WinXP Toolbar using Python, but have totally failed to get an Icon to appear in My Computer. Any Idea on why and maybe how to get around this using Python? Thanks,
5
1911
by: yxq | last post by:
Hello The icons with the alpha channel are supported in WindowsXP. If use the System.Drawing.Bitmap.ToBitmap on the icon handle(ico.ToBitmap), the alpha channel won't be preserved, resulting in an ugly black border where the alpha area. But if the icons with the alpha channel must be show in a picuturebox, how to do? Picturebox1.Image=??? The article http://www.vbaccelerator.com/home/NET/Code/Libraries/Shell_Projects/Getting_
3
1908
by: EricJ | last post by:
Hi I'm having trouble getting icons from an imagelist in a statusbar panel. if i load the icons directly it works Dim ico As new Icon("W95MBX03.ICO") statusbarPanel..Icon = ico but if i try to set the icon property with an imagelist i get this Value of type 'System.Drawing.Image' cannot be converted to
7
2732
by: Benny Raymond | last post by:
I searched for a couple hours lastnight on example code of how to go about making an item in the System Tray (notification area) not be square. I've found several programs that do this but I can't seem to find any documentation on how to actually get this to work. I checked out some system messages that NotifyIcon uses thinking that I could just make my component from scratch using these but nothing seemed to be allowed to adjust the...
4
6548
by: randy1200 | last post by:
I have a Windows application that previously had the company logo "MyCompany.ico" added to the upper left-most corner. The company has since issued a new version of "MyCompany.ico" that looks completely different. I overwrote the old ico file with the new ico file and re-ran the program. I still see the old logo at run-time. I right-clicked the project-> Add Existing Item-> added the new ico file. I set the build action to Embedded...
3
1335
by: Mark | last post by:
Hi I'm using vb.Net in VS2005 and want to extract the icon for file refence records. I saw an example a while back that searched the registry for the default icon etc. It was a little long winded. I have since discovered "Drawing.Icon.ExtractAssociatedIcon" which can do the same job in one line of code.
5
4136
by: wajedali | last post by:
Hi I am having trouble rendering a combo box with icon near the text. Below is a simple code which demonstrates my problem. import java.awt.Component; import java.util.HashMap; import javax.swing.Icon; import javax.swing.ImageIcon; import javax.swing.JComboBox; import javax.swing.JLabel;
1
2118
by: Perl Beginner | last post by:
Hello all, I have created a GUI box using Win32::GUI::Window and all i want to do is add a question mark icon in the window on the left, but i'm having trouble figuring that out. i know that using Win32::GUI::MessageBox has options that you can use such as MB_ICONQUESTION, MB_ICONEXCLAMATION, etc, but i don't see anything for Win32::GUI::Window. Any suggestions? Here is part of my code. the second window is the one that i want to put an...
0
8454
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8362
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8878
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8785
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8644
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7389
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5671
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
2776
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 we have to send another system
2
1778
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.