Click here to Skip to main content
15,891,204 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
Hi All

I want to change the icon on the task bar continuously.

Means:
In skype when u got a message the icon on the task bar changed and show digit 1 with the skype logo and when we open the skype and see the message the 1 digit is invisible .

I want to implement this in my form .

Please Help me to implement this.


Thanks in advance..
Posted

1 solution

C#
    int i= 1;

//in button click event
        if (i == 1){
            this.Icon = WindowsFormsApplication1.Properties.Resources.Icon1;
            i = 2}
        else
            {this.Icon = WindowsFormsApplication1.Properties.Resources.Icon2;
            i = 1;}



This way u can change the icons.
To test this code, simply create a form and add a button. In the button's click event add the provided code.
then create 2 icons in the project and run.
 
Share this answer
 
Comments
bhagirathimfs 4-May-12 3:02am    
One query
When 13 or 14 messages will come than i have write this if else clause for 13 to 14 times????
or any other method is there???

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