Icon problem

  • Thread starter Thread starter Lloyd Dupont
  • Start date Start date
L

Lloyd Dupont

I'm developping an apps which would manage 2 file type (I could foresee so
far).
I would like to provide each of them with its icon.

Now, in the "Good Old Win32 days" (which I never practice ;-) I could just
embed Icon resource in my app, with a negative index, and register with
windows shell API my file extension and icon index in my exe file.

Now the question is... how could I do that in .NET?
It looks like I will have only one icon possible, the app icon :-(
 
You can add as many icons as you want to your app. Set the build action to
embedded resource. The name of the icon in your program will be of the form
"appname.iconname.ico". You can then create an icon object for any of the so
named embedded resources and assign it to a form or whatever. doing this is
described in the online documentation.
 
I don't think I will be able to pick them up with Windows Explorer if I do
that, I think I had tried without suceess and that they are not embeded in
..NET application the same way as they were embeded in win32 application,
there fore they don't show up when you do, let's say, change target icon for
a link.
Anyway I will try.
 
Back
Top