Re: Updating Application Icon

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



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
.



Relevant Pages

  • Re: Updating Application Icon
    ... This brings me back to the previous icon displayed at run-time. ... How do I update the form's resource file? ... "MyCompany.ico" added to the upper left-most corner. ... I still see the old logo at run-time. ...
    (microsoft.public.dotnet.languages.csharp)
  • RE: macro for footer
    ... Right click the XL icon in the upper left ... hand corner of the XL window and select View code. ...
    (microsoft.public.excel.misc)
  • Re: desktop
    ... The upper left is where any icon starts loading on the Desktop. ... use widgets, and its really annoying when an icon is created behind them. ...
    (microsoft.public.windowsxp.general)
  • Re: Road Runner Icon
    ... logo (throbber) on the upper ... The little one at the upper right hand corner of the ... > program changed the icon from the windows flag to road runner icon. ...
    (microsoft.public.windowsxp.customize)
  • Re: Road Runner Icon
    ... The following instructions by MVP Kelly shows us how to change the logo (throbber) on the upper ... The little one at the upper right hand corner of the ... > program changed the icon from the windows flag to road runner icon. ...
    (microsoft.public.windowsxp.customize)