FavIcon for your web browser

Do you know of any tutorial videos online that offer help with programming or have you made a helpfull video then please share them in here.
12 posts Page 1 of 2
Contributors
User avatar
Agust1337
Coding God
Coding God
Posts: 2456
Joined: Fri Feb 19, 2010 8:18 pm

FavIcon for your web browser
Agust1337
Subscribe
Rate
Comment :))
hi again guys in this tutorial i will show you how to add the icon that appears when you load a page like on microsoft wbsite it shows a M and so on... but anyways heres the project and code:
Project: http://www.mediafire.com/download.php...
code:
---
Put these codes into WebBrowser1_Navigated:
Code: Select all
Dim response As System.Net.HttpWebResponse
Dim request As System.Net.WebRequest
Dim iconURL As String Dim favicon As Image
Dim stream As System.IO.Stream 
Dim url As Uri = WebBrowser1.Url 
If url.HostNameType = UriHostNameType.Dns Then
IconURL = "http://" & url.Host & "/favicon.ico"
request = System.Net.HttpWebRequest.Create(iconURL)
Try
response = request.GetResponse()
stream = response.GetResponseStream() 
Catch 
For Each element As HtmlElement In WebBrowser1.Document.GetElementsByTagName("link") 
If element.GetAttribute("rel").ToUpper = "SHORTCUT ICON" Then
Dim iconplace As String = element.GetAttribute("href") 
Request = System.Net.HttpWebRequest.Create(WebBrowser1.Url.ToString + iconplace) 
response = request.GetResponse() stream = response.GetResponseStream() 
favicon = Image.FromStream(stream) 
Me.PictureBox1.Image = favicon
Exit For
End 
If 
Next 
End Try 
If Not stream Is Nothing Then 
favicon = Image.FromStream(stream) Me.PictureBox1.Image = favicon
End If 
End If 
---
Last edited by Agust1337 on Thu Feb 24, 2011 8:56 am, edited 1 time in total.
You're crazy!
I'm not crazy, my mother had me tested. ~Sheldon Cooper
User avatar
mandai
Coding God
Coding God
Posts: 2585
Joined: Mon Apr 26, 2010 6:51 pm

Re: FavIcon for your web browser
mandai
User avatar
Agust1337
Coding God
Coding God
Posts: 2456
Joined: Fri Feb 19, 2010 8:18 pm

Re: FavIcon for your web browser
Agust1337
You're crazy!
I'm not crazy, my mother had me tested. ~Sheldon Cooper
User avatar
mandai
Coding God
Coding God
Posts: 2585
Joined: Mon Apr 26, 2010 6:51 pm

Re: FavIcon for your web browser
mandai
Did they say you could use their tutorial?
User avatar
Agust1337
Coding God
Coding God
Posts: 2456
Joined: Fri Feb 19, 2010 8:18 pm

Re: FavIcon for your web browser
Agust1337
mandai wrote:
Did they say you could use their tutorial?
I never 'used' their tutorial i only 'used' the codes.
You're crazy!
I'm not crazy, my mother had me tested. ~Sheldon Cooper
Lewis
Coding God
Coding God
Posts: 1564
Joined: Sun Dec 20, 2009 2:12 pm

Re: FavIcon for your web browser
Lewis
Well i think it isnt copied because me, i wouldnt of gone to the microsoft site now hes posted this i know how to do it. hes just spreading it on. He diddnt say it was his codes.
Image
User avatar
Agust1337
Coding God
Coding God
Posts: 2456
Joined: Fri Feb 19, 2010 8:18 pm

Re: FavIcon for your web browser
Agust1337
Lewis-Froom wrote:
Well i think it isnt copied because me, i wouldnt of gone to the microsoft site now hes posted this i know how to do it. hes just spreading it on. He diddnt say it was his codes.
Exactly and no body owes any code, Microsoft made them.
You're crazy!
I'm not crazy, my mother had me tested. ~Sheldon Cooper
User avatar
zachman61
VIP - Donator
VIP - Donator
Posts: 1891
Joined: Wed Dec 16, 2009 9:56 pm

Re: FavIcon for your web browser
zachman61
true and mandai why start stuff?
Nailing my feet to the floor is easier than using my own muscles to balance, but you don't see me doing that :)
User avatar
Agust1337
Coding God
Coding God
Posts: 2456
Joined: Fri Feb 19, 2010 8:18 pm

Re: FavIcon for your web browser
Agust1337
mandai wrote:
Copied from http://social.msdn.microsoft.com/Forums ... d43867c014
And btw are you only here to say "You took this code from this website" or like with the product recovery key that Mark made "There are plenty of free products that can recover these keys".
Ok so don't tell me that you have NEVER went on a website and checked for any code's, everyone does it even CodenStuff(but i dont know always, and i don't go search for it, but for example this post which i posted and Codenstuff got the code's for me, and he said this is code from kaymaf, and so what, hes just spreading so more and more people know how to do these.) does it, and so what if someone makes a program like Mark made a product key recovery. so what are you doing here?
You're crazy!
I'm not crazy, my mother had me tested. ~Sheldon Cooper
User avatar
mandai
Coding God
Coding God
Posts: 2585
Joined: Mon Apr 26, 2010 6:51 pm

Re: FavIcon for your web browser
mandai
And btw are you only here to say "You took this code from this website"
Lol no I'm just pointing out a possible code source, people might want to know.
or like with the product recovery key that Mark made "There are plenty of free products that can recover these keys".
Whats wrong with giving the users a [free] alternative idea?

Ok so don't tell me that you have NEVER went on a website and ..
Sure I do my research but I don't post word by word and if I did I would at least mention the source of where I got it from.
12 posts Page 1 of 2
Return to “Videos”