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(@"..\..\My Company.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,
--
Randy 4 6552
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(@"..\..\My Company.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
Thanks for the replay.
I commented out the this.Icon = new Icon(@"..\..\My Company.ico");
This brings me back to the previous icon displayed at run-time.
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).
<<<
How do I update the form's resource file? I tried right-clicking
Rsources.resx and selecting Refresh. No effect. Also, there's no explicit
reference to MyCompany.ico in either Resoucres.resx or Resources.Desig ner.cs.
MyCompany.ico is listed as a file in the solution explorer.
Is the property viewer what I get from right-clicking the project,
application tab, Resource Group, Icon? Again, I browse to the new icon, and
see it in the preview to the right of the browse button, but not at run-time.
Is it possible that the size of the file is causing problems with the two
methods above. The file size is 25 k. I believe the file is valid because it
displays using the "new Icon" line is the constructor.
Thanks,
--
Randy
"Tom Spink" wrote:
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(@"..\..\My Company.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
randy1200 wrote: Thanks for the replay.
I commented out the this.Icon = new Icon(@"..\..\My Company.ico");
This brings me back to the previous icon displayed at run-time.
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). <<<
How do I update the form's resource file? I tried right-clicking Rsources.resx and selecting Refresh. No effect. Also, there's no explicit reference to MyCompany.ico in either Resoucres.resx or Resources.Desig ner.cs. MyCompany.ico is listed as a file in the solution explorer.
Is the property viewer what I get from right-clicking the project, application tab, Resource Group, Icon? Again, I browse to the new icon, and see it in the preview to the right of the browse button, but not at run-time.
Is it possible that the size of the file is causing problems with the two methods above. The file size is 25 k. I believe the file is valid because it displays using the "new Icon" line is the constructor. Thanks,
Hi Randy,
I'm sure the file is valid. If you expand the form in the Solution Viewer,
it should show you a specific resources file for that form. I believe if
you open that, you'll be able to re-import the icon file.
When you have the form open in Design-View, you should just be able to
change the 'Icon' property of the form, using the 'Property Viewer'. The
property viewer should be underneath the Solution Explorer... hit F4 on
your keyboard, while the form is open, if it's not.
Hope this helps,
-- Tom Spink
Now I see it. That was extremely helpful. Many, many thanks...
--
Randy
"Tom Spink" wrote: randy1200 wrote:
Thanks for the replay.
I commented out the this.Icon = new Icon(@"..\..\My Company.ico");
This brings me back to the previous icon displayed at run-time.
> 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). <<<
How do I update the form's resource file? I tried right-clicking Rsources.resx and selecting Refresh. No effect. Also, there's no explicit reference to MyCompany.ico in either Resoucres.resx or Resources.Desig ner.cs. MyCompany.ico is listed as a file in the solution explorer.
Is the property viewer what I get from right-clicking the project, application tab, Resource Group, Icon? Again, I browse to the new icon, and see it in the preview to the right of the browse button, but not at run-time.
Is it possible that the size of the file is causing problems with the two methods above. The file size is 25 k. I believe the file is valid because it displays using the "new Icon" line is the constructor. Thanks,
Hi Randy,
I'm sure the file is valid. If you expand the form in the Solution Viewer, it should show you a specific resources file for that form. I believe if you open that, you'll be able to re-import the icon file.
When you have the form open in Design-View, you should just be able to change the 'Icon' property of the form, using the 'Property Viewer'. The property viewer should be underneath the Solution Explorer... hit F4 on your keyboard, while the form is open, if it's not.
Hope this helps, -- Tom Spink This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Tim Jarman |
last post by:
Apologies in advance for the long post - I wanted to be sure I included all
the relevant details. The answer is probably very, very simple.
I am doing something stupid here, but I don't know what it is. I'm writing
an application with a Tkinter GUI (Python 2.4, Tcl/Tk 8.4.) and I want to
put a custom icon on the main window.
I've followed (so far as I understand it) the recipe in the eff-bot's
splendid Introduction to Tkinter - see:...
|
by: Sam |
last post by:
I've been googling for a couple of hours now and tried some different
things, but I've been unable to get the icon for a distributed access
application to do anything but display the default microsoft access
icon. I've included the icon with the distribution and specified it as
the application in the icon in the wizard, but no love from Access.
Any help with this will me much appreciated.
Thanks,
Sam90
|
by: Wayne |
last post by:
I currently have an app whose Icon I am setting. I want to set the icons in
my forms at run time to that of the application icon. How do I retrieve the
application Icon so that I can use it for my forms? once retrieved can I
just set the form Icon? or do I need to do something special?
Thanks
Wayne
|
by: Elad Gutman |
last post by:
Hi Everyone,
I'm facing an annoying problem and any help will be most appreciated .
.. .
I have a main application form and its icon is functioning excellent:
it appears both in the taskbar and whenever you switch using the Alt +
Tab keys.
At a certain point of the code I'm creating a new form, using a
different thread for this task in order to prevent 'blinking' until
|
by: Paul |
last post by:
In other development environments i've used the IDE had
facilities to create custom icons for the application and
files it created. It would be nice to have a custom icon
for a created file, but it is more important to give the
application its own icon. I've looked in over ten books in
VB.net programming and none of them cover this issue. How
do I do it or where do I find the info?
Thanks,
| |
by: QLD_AU |
last post by:
Is their a way in a VB.Net application to set all sub form icons to the main
form ? or even set all icons to the Application icon, without having to
reference the icon as a filename ?
With Thanks
Jason
|
by: Dick |
last post by:
I have a shared project that contains icons and bitmaps that are used
throughout my suite of applications.
I have to set Form.Icon, PictureBox.Image, etc. using code because the form
designer can't see the icons and bitmaps unless they're in the local project.
This is only slightly inconvenient compared to the benefits from managing the
icons and bitmaps centrally.
However, I can't see how to do set the Application Icon using code. It...
|
by: Avnish |
last post by:
Hi,
I have created an form based application in c# having some GUI. I have also
added localization support to it due to GUI changes for different
customers.Now the issue I have the Application icon can be set only through
Property page in common properties as is the Output file name. But i need
different icons (output file) for different customers and I have same code
base for all. As far as form icons are concerened they are obtained...
|
by: developer77 |
last post by:
Hi, Im using VS2005 vb.net .
If I set the application icon to a known good icon , with all reasonable embedded sizes (16x16, 32x32, 64x64. 128x128, 256x256) then its not showing correctly in win 7.
Although the .exe icon is correct in explorer, the default application icon shows in the preview pane at the bottom of win7's explorer, and if I create a shortcut on the desktop by right clicking the exe, I also get a shortcut with the incorrect...
|
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,...
|
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...
| |
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...
|
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...
|
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
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();...
|
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
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...
| |