Re: Updating Application Icon
- From: Tom Spink <tspink@xxxxxxxxx>
- Date: Fri, 23 Jun 2006 17:06:48 +0100
randy1200 wrote:
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 Resource, and the Copy to Output to
Copy Always. I still see the old logo at run-time.
I right-clicked my project and selected properties. In the Application
tab, I selected my new Icon file. I see the new Icon appear to the right
of the elipse button. I STILL see the old icon at the upper left-most
corner at run time.
I added the following line to my start-up project constructor:
this.Icon = new Icon(@"..\..\MyCompany.ico");
This worked. I see the new logo at the upper left-most corner at run-time.
I'd really like to know why the other options didn't work. Please don't
answer unless you've actually tried this recently in Visual Studio 2005.
I've been at this a long time, and this is the first time I've had this
much trouble. I'm sure people are going to ask me why the first attempts
didn't work.
Thanks,
Hi Randy,
You may have updated the icon on the hard-drive, and even added it as an
embedded resource... but that's not how it becomes part of a form's icon.
A form has a property 'Icon', which you correctly assigned to, in order to
change the icon. The value of this property, when updated with the
designer is stored in a resource file, and not directly referenced from the
disk. You need to either update the form's resource file, with the new
icon, or simply browse for the new icon on your hard-drive, by means of the
Property Viewer (assuming you're using the Windows Forms Designer).
Does this answer your question?
-- Tom Spink
.
- Follow-Ups:
- Re: Updating Application Icon
- From: randy1200
- Re: Updating Application Icon
- Prev by Date: Re: "lock" keyword and exceptions
- Next by Date: Re: Closing socket during async Receive
- Previous by thread: Fairly simple I think
- Next by thread: Re: Updating Application Icon
- Index(es):
Relevant Pages
|