Hi All,
I would like to make to change icon in the same form.
By this means that the form has 2 functionality: when functionality is changed also icon must be changed in the same form.
Is there any ideas for solving the problem
Many Thanks.
Hi All,
I would like to make to change icon in the same form.
By this means that the form has 2 functionality: when functionality is changed also icon must be changed in the same form.
Is there any ideas for solving the problem
Many Thanks.
Icon in Form
Noel
I have no idea what you're talking about. The Icon property is a property. It can be set in the designer, but only because the designer exposes some properties at design time. It's still a property, i.e. a code construct that can be manipulated in code.
EllaSlim
the form A has 2 functionalies also it is flexible form some times changed form A caption by which form B pop-up form A, if form C needs to pop -up form A, at the moment form A's icon and caption must be changed.
therefore, it must be accessed by source level not in property.
Andy Male
I mean that design of Form A is flexible, so icon and form caption are changed by out side effect, not in property.
Trevin Chow - MSFT
Hi all
the problem is how to implement changing the current form icon property
In case of .Net 2005, it is fine to change icon by adding icon in folder of resource, but when I try to add in .Net 2003 it is not.
if ( this is form B, pop-up form A)
{
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
}
else
this.Icon = ((System.Drawing.Icon)(resources.GetObject("New.Icon")));
}
above algorithm is fine in .Net 2005 but not in .Net 2003
Is there any ideas to solve this problem in .Net 2003
Vasiq
I don't understand. There is an icon property, that's how you set the icon. You can load an icon from disc, or embedd it in your resources. You really don't have any other options.
albnig
I know there is an Icon proprity, but I would like to change an Icon in source level by different behavior.
Moclobe
I am at a loss. You have a property you can set, in your code, whenever you like. Where is the problem
AdiArbel79
The form has an Icon property, just change it.
AlCant
hi,
you can add a form counter to your A form and every pop_Up form will be opend from From A you increase the counter,
but by any mean you have to add a property or method in form A to change the form icon property
private int popupcounter = 0;
public void popup()
{
pupupcounter++
if(popupcounter >2)
//change the current form icon property
else
//set the current form default icon
}
when you open any popup form in any method point to popup method
hope this helps