Click here to Skip to main content
15,949,741 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I changed the Icon in main windows where valor is type of system, like this:
if (valor == 4)
	this.Icon = BitmapFrame.Create(new Uri("pack://application:,,,/Vendas;component/Imagens/icone-vs.ico", UriKind.RelativeOrAbsolute));
else if (valor == 6)
	this.Icon = BitmapFrame.Create(new Uri("pack://application:,,,/Vendas;component/Imagens/icone-v.ico", UriKind.RelativeOrAbsolute));
else if (valor == 7)
	this.Icon =  BitmapFrame.Create(new Uri("pack://application:,,,/Vendas;component/Imagens/icone-s.ico", UriKind.RelativeOrAbsolute));


But when I install this path
C:\DC_System\Vendas
the Icon just task bar not show. The interesting is that if i change the name of executable, the icon show. How can I resolve this?

What I have tried:

if (valor == 4)
	this.Icon = BitmapFrame.Create(new Uri("pack://application:,,,/Vendas;component/Imagens/icone-vs.ico", UriKind.RelativeOrAbsolute));
else if (valor == 6)
	this.Icon = BitmapFrame.Create(new Uri("pack://application:,,,/Vendas;component/Imagens/icone-v.ico", UriKind.RelativeOrAbsolute));
else if (valor == 7)
	this.Icon =  BitmapFrame.Create(new Uri("pack://application:,,,/Vendas;component/Imagens/icone-s.ico", UriKind.RelativeOrAbsolute));
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900