Wayne
If you are referring to the App.ico resource that the wizard supplies, you
can compile the App icon as an embedded resource - then create a static
method as Nicholas suggested to return a reference to the Icon object. In
Solution Explorer, right click on the icon resource, select Properties, and
change the Build Action to Embedded Resource. Then to get the icon resource
into an Icon object, try something like this in the main method of your app:
static void Main()
{
myIcon = new Icon(typeof(Form1),"MY_ICON.ICO");
/* do something with myIcon here... */
Application.Run(new Form1());
}
You can easily add icons and include them as resources in the assembly using
the IDE Add|Existing Item, browsing to the file that contains the .ico
resource, and then changing the Build Action to Embedded Resource.
Note - the icon resource name is case sensitive in the Icon constructor...
regards
roy fine
"Wayne" <ws*****@NoLandSpamstar.com> wrote in message
news:eQ****************@tk2msftngp13.phx.gbl...
I currently have an app whose Icon I am setting. I want to set the icons
in my forms at run time to that of the application icon. How do I retrieve
the application Icon so that I can use it for my forms? once retrieved can I
just set the form Icon? or do I need to do something special?
Thanks
Wayne