Getting an icon for a window out of a resource.

  • Thread starter Thread starter UJ
  • Start date Start date
U

UJ

I have an icon file stored as part of a program as a resource (Embedded
Resource). How can I get the file out of the resource to be able to set a
window's icon to the icon?

(I know the icon is there because I can pull it out as bit map and display
it.)

TIA - Jeff.
 
In .net 2.0..

class myForm : Form {
void InitializeComponent() {
Icon = Resources.MyIcon;
}

}
 

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

Back
Top