ExtractIconEx using *.ico files?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi

I am trying to use ExtractIconEx to show an icon on the notification area. The notification side of things is OK and working fine. However I need to be able to show a variety of icons; currently I am usin

ExtractIconEx(System.Reflection.Assembly.GetCallingAssembly().GetModules()[0].FullyQualifiedName, 0, 0, ref m_hIcon, 1)

which uses the current application icon; however I would like to point to a resource file or ico file to display.
 
The method I use is to add an to my project, under the properties for the
file I change build action to "Embeded Resource" then I can use the
following to get an Icon. DataTransfer is just a separate directory in my
project files view.

System.IO.Stream strm =
System.Reflection.Assembly.GetExecutingAssembly().GetManifestResourceStream(
"Pinnacle.WalkAbout.DataTransfer.BlankIcon.ico");

Icon ic = new Icon(strm);

Hope that helps.



Neil Macdonald said:
Hi,

I am trying to use ExtractIconEx to show an icon on the notification area.
The notification side of things is OK and working fine. However I need to
be able to show a variety of icons; currently I am usingExtractIconEx(System.Reflection.Assembly.GetCallingAssembly().GetModules()[0
].FullyQualifiedName, 0, 0, ref m_hIcon, 1);
which uses the current application icon; however I would like to point to
a resource file or ico file to display.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

ExtractIconEx 5
Extract exe file icon. 6
saving icon to a file 2
ICO files and BMP files 1
Icons in DLL's 2
config file path. 5
All icons for *.ico files are blank 3
Problems Adding Icons to ImageList 3

Back
Top