.net cf 1 Extract Icon

S

Simon Hart [MVP]

This is assuming the icon is in the current executing assembly and you're
dealing with managed code only:

Stream stream =
Assembly.GetExecutingAssembly().GetManifestResourceStream("namespacetoicon.myicon.ico");
Icon icon = new Icon(stream);

If the exe in not in the callers context (and is managed) use the
Assembly.LoadFrom method.

I think Alex's post is loading an icon from any executable (native or
managed).
 

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

Top