Einar,
Set the icon with the Form's icon property from the Property Sheet instead of in code. It will embed it that way.
~~Bonnie
>I found something that I didn't expect today when running an app on my test computer. I created a very basic form class, just setting the backcolor and the icon property. See code below:
>
>
>public class alsForm: System.Windows.Forms.Form
>{
> public override Color BackColor
> {
> get{return base.BackColor;}
> set{;}
> }
>
> public alsForm()
> {
> base.BackColor = ALS.Subclass.Controls.alsDefaultSettings.alsBACK_COLOR;
> base.Icon = new Icon(@"C:\work\Images\Icon\Alliance_Logo.ico");
> }
>}
>
>
>If I use this alsForm in my project things are looking great, but if I try to run the exe on a different computer an exception is thrown stating, quite correctly, that the icon can not be found in the location C:\work\Images\Icon\Alliance_Logo.ico.
>
>Why isn't the icon built into the exe? How can I force the icon to be built into the exe?
>
>
>Thanks,
>Einar
>
>Update: I want to use the same icon on all the forms as the icon I select for the exe icon.