Click here to Skip to main content
15,881,898 members
Articles / Programming Languages / Visual Basic

How To Get A Website Thumbnail in a C# Application Without Creating A Form (console)

Rate me:
Please Sign up or sign in to vote.
4.66/5 (14 votes)
5 Jul 2008CPOL3 min read 171K   6   73  
The article describes how to get a thumbnail of a Website in .NET Framework 2.0+ without launching a fully interactive WinForms application.
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;

// General Information about an assembly is controlled through the following 
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("Site Thumbnail Getter")]
[assembly: AssemblyDescription("The application that snaps a website screenshot and saves it to a file.")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Adam Najmanowicz")]
[assembly: AssemblyProduct("GetSiteThumbnail.Properties")]
[assembly: AssemblyCopyright("2008 Adam Najmanowicz")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

// Setting ComVisible to false makes the types in this assembly not visible 
// to COM components.  If you need to access a type in this assembly from 
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(true)]

// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("203fc34d-f871-49fc-be94-bff0c84a0b12")]

// Version information for an assembly consists of the following four values:
//
//      Major Version
//      Minor Version 
//      Build Number
//      Revision
//
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

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


Written By
Web Developer
Poland Poland
Adam Najmanowicz is a Senior Developer at Cognifide Poland.

His previous experience includes Delphi, .Net as well as Java Development.

Currently working on ASP.NET + MSSql Server(Oracle) solutions for enterprises.

Also developing desktop applications for Stardock Systems.

Comments and Discussions