Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Custom form class: icon property
Message
 
À
22/03/2005 10:11:22
Information générale
Forum:
ASP.NET
Catégorie:
Formulaires
Divers
Thread ID:
00998076
Message ID:
00998089
Vues:
17
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.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform