Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


[C# Help] Favicon

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
TheIndianGuy
Advanced Cheater
Reputation: 102

Joined: 14 Jan 2007
Posts: 88

PostPosted: Wed Oct 17, 2007 8:32 pm    Post subject: [C# Help] Favicon Reply with quote

i wanted to know how to display a websites favicon in C# on a web browsing program

for example you add a webbrowser tool and i guess a picturebox to display the websites favicon

what code would i have to use to display the icon in the picturebox
Back to top
View user's profile Send private message
GFCM
Advanced Cheater
Reputation: 0

Joined: 03 Oct 2007
Posts: 62

PostPosted: Thu Oct 18, 2007 1:00 pm    Post subject: Reply with quote

are you dealing with a asp .net c# proj?

i remember i did that once, i was fixing a icon from a website thought i had the c# code..

it worked with css and path of icon, thought i dont have the code :S
Back to top
View user's profile Send private message
killersamurai
Expert Cheater
Reputation: 0

Joined: 10 Sep 2007
Posts: 197
Location: Colorado

PostPosted: Thu Oct 18, 2007 3:19 pm    Post subject: Reply with quote

First of all, you need the link to the favicon if the website provides one. Then, you need to make a request to download it.

Code:

System.Net.WebRequest webreq = System.Net.WebRequest.Create("http://www.favicon.com/favicon.ico");
System.Net.WebResponse response = webreq.GetResponse();
System.IO.Stream s = response.GetResponseStream();
Image img = Image.FromStream(s);
s.Close();
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites