Changing Icon like in skype
Heres your chance to share your own tutorials with the community. Just post them on here. If your lucky they may even be posted on the main site.
4 posts
Page 1 of 1
Introduction:
So as most of you may know when you receive a notification in skype, the icon will show the amount of notifications you have.
Today i will teach you how to achieve such effect.
Tutorial:
1. First of make a picturebox in your application with your image (later you can get rid of it, but for now make it big so you can see your work)
2. Now add a button or find an event in which it will change the icon of the form
3. Now for the code!
3a. First we want to declare the image so write this
End Results:
Your code should now look something like this
Some things people might mention are you don't really need to declare the ico variable. You could just get rid of it and at the end right this
Thanks for reading and bye!
So as most of you may know when you receive a notification in skype, the icon will show the amount of notifications you have.
Today i will teach you how to achieve such effect.
Tutorial:
1. First of make a picturebox in your application with your image (later you can get rid of it, but for now make it big so you can see your work)
2. Now add a button or find an event in which it will change the icon of the form
3. Now for the code!
3a. First we want to declare the image so write this
Code: Select all
3b. Then declare the variable we want to show on the imageDim ti As Bitmap = PictureBox1.Image 'Or whatever image you want, could be Me.Icon.ToBitmap
Code: Select all
3c. We now get the graphics of the imageDim int As Integer = 1 'Enter your value here
Code: Select all
3d. Add one more variable, the iconDim g As Graphics = Graphics.FromImage(ti) 'Gets ti's graphics
Code: Select all
3e. Ok this is where things get tricky so you will need to adjust this a lot because this is all your preference. This will be the circle which encloses 'int'. I went for a gold background which starts in the bottom left of my picture. Dim ico As Icon 'Icon variable
Code: Select all
3f. Finally we get rid of the graphicsg.FillEllipse(Brushes.Gold, New Rectangle(New Point(PictureBox1.Size.Width - 40, PictureBox1.Size.Height - 40), New Size(70, 70))) 'This is the circle
Code: Select all
3g. Now we declare what the icon will look likeg.Dispose()
Code: Select all
3h. Set the form's icon as the one we just gotico = Icon.FromHandle(ti.GetHicon)
Code: Select all
_____________________________________________________________________________________________________________________ Me.Icon = ico 'Sets the new icon
End Results:
Your code should now look something like this
Some things people might mention are you don't really need to declare the ico variable. You could just get rid of it and at the end right this
Code: Select all
Here is what i got in the endMe.Icon = Icon.FromHandle(ti.GetHicon)
Thanks for reading and bye!
I'm sure that Skype uses another, much simpler method. #Agust1337 has already posted a tutorial for .NET Agust1337 - windows 7 taskbar things
LMAOSHMSFOAIDMT
Laughing my a** of so hard my sombrero fell off and I dropped my taco lmao;
Over 30 projects with source code!
Please give reputation to helpful members!
Laughing my a** of so hard my sombrero fell off and I dropped my taco lmao;
Over 30 projects with source code!
Please give reputation to helpful members!
nice one #Bogoh67 looking cool :lol: thanks for sharing.
visit us on:
http://www.softpedia.com/get/System/Lau ... -Run.shtml
Check it out ! http://www.softpedia.com/publisher/I-A- ... 90017.html
Check it out ! http://www.softpedia.com/get/Desktop-En ... lock.shtml
http://www.softpedia.com/get/System/Lau ... -Run.shtml
Check it out ! http://www.softpedia.com/publisher/I-A- ... 90017.html
Check it out ! http://www.softpedia.com/get/Desktop-En ... lock.shtml
MrAksel wrote:I'm sure that Skype uses another, much simpler method. #Agust1337 has already posted a tutorial for .NET Agust1337 - windows 7 taskbar things
Good good point . I guess this is a way without windows API code pack
4 posts
Page 1 of 1
Copyright Information
Copyright © Codenstuff.com 2020 - 2023