Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Custom form class: icon property
Message
 
To
22/03/2005 10:11:22
General information
Forum:
ASP.NET
Category:
Forms
Miscellaneous
Thread ID:
00998076
Message ID:
00998089
Views:
18
Bonnie,
That is what I figured someone would say. I was hoping I could just use code and not have to use the designer for this, but oh well.

Einar
>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.
Semper ubi sub ubi.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform