E
Ed Sutton
What's the trick to loading an icon from the embedded resources?
Here are the steps I have taken:
-------------------------
1 - I added a file named "FOLDER01.ICO" to my solution project
2 - I changed "Build Action" for the file to "Embedded Resource"
3 - At the end of my constructor, I try to load an icon and it throws the
following exception:
Exception:
"Resource 'myProject.frmMain.FOLDER01.ICO' could not be found in class
'myProject.frmMain'."
namespace myProject
{
public class frmMain : System.Windows.Forms.Form
{
public frmMain()
{
// This throws an exception
Icon = new Icon(typeof(frmMain),
"myProject.frmMain.FOLDER01.ICO");
}
Thanks in advance for any tips or suggestions,
-Ed
Here are the steps I have taken:
-------------------------
1 - I added a file named "FOLDER01.ICO" to my solution project
2 - I changed "Build Action" for the file to "Embedded Resource"
3 - At the end of my constructor, I try to load an icon and it throws the
following exception:
Exception:
"Resource 'myProject.frmMain.FOLDER01.ICO' could not be found in class
'myProject.frmMain'."
namespace myProject
{
public class frmMain : System.Windows.Forms.Form
{
public frmMain()
{
// This throws an exception
Icon = new Icon(typeof(frmMain),
"myProject.frmMain.FOLDER01.ICO");
}
Thanks in advance for any tips or suggestions,
-Ed