![]() |
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
![]() |

|
| Programming tutorials All Knowledge Info and links to posted here |
![]() |
|
Load an Icon from an Embedded Resource in .NET
|
LinkBack | Thread Tools | Display Modes |
|
|
#1 (permalink) |
|
Administrator
Posts: 18,715
Join Date: Jan 2006
Rep Power: 10
IM:
|
Your icon file should be a regular windows icon file. Add it to your project, and in the properties for the icon make sure that it is set to Embedded Resource. Now in your code, add the following line: Icon theIcon = new Icon(System.Reflection.Assembly.GetExecutingAssemb ly().GetManifestResourceStream("MyNameSpace.Filena me.ico")); Replace "MyNameSpace" with the namespace of your application, and replace "Filename" with the name of your icon file. You should now be able to use the icon directly in any windows control that uses icons, like the NotifyIcon control. |
|
|
|
|
|
|
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Resource Builder 2.6.4 | Krazzy | Application Downloads | 0 | 29-Feb-2008 09:26 AM |
| Restore/Change Icon, Immediate delete, Fix Broken Icon (Not Refreshing) | Anilrgowda | Microsoft windows vista error | 0 | 27-May-2007 10:56 PM |
| Favorites Icon - Check this out if you need a favorites icon for your website | Iphone | Graphic tutorials | 0 | 08-May-2007 02:49 AM |
| Error Icon - In this tutorial you will learn how to create a 404 error icon | Iphone | Graphic tutorials | 0 | 16-Apr-2007 11:09 PM |
| Icon in IE 7 Address Bar has changed to default icon and not IE icon | Iphone | Internet Explorer Error | 1 | 12-Apr-2007 05:12 AM |