1

I'm trying to implement a website screen shot class as described here http://www.plentyofcode.com/2007/09/website-screenshot-capture-with-aspnet.html

The class imports the following methods

Imports System
Imports System.Drawing
Imports System.Drawing.Imaging
Imports System.Windows.Forms
Imports System.Diagnostics

Namespace GetSiteThumbnail

   Public Class GetImage [...]

The reference to System.Windows.Forms apparently worked in asp.net 2.0 but has been removed from 3/3.5 is there an equivalent for 3.5 or does anyone know a way to replicate this website screen shot setup in 3.5?

JaredPar
  • 733,204
  • 149
  • 1,241
  • 1,454
Birk
  • 2,173
  • 4
  • 21
  • 26

3 Answers3

8

can you just add the references to the System.Windows.Forms dll ?

John Boker
  • 82,559
  • 17
  • 97
  • 130
1

Your project needs a reference to the System.Windows.Forms assembly. Make sure it is there.

Samuel
  • 37,778
  • 11
  • 85
  • 87
1

For refrence to anyone looking at this later. By adding

<add assembly="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>

To the <assemblies> section of your web.config file you can use System.Windows.Forms

Birk
  • 2,173
  • 4
  • 21
  • 26
  • Gah, you made me cringe there. You shouldn't use the Forms assembly in a ASP.Net website. – Samuel Apr 06 '09 at 17:27
  • 1
    It's only to get a screenshot of another website... If you've got another idea I'd love to hear it – Birk Apr 06 '09 at 17:48