views:

1281

answers:

4

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?

+6  A: 

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

John Boker
Thanks :) That did the trick.
Birk
+1  A: 

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

Samuel
A: 

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
Gah, you made me cringe there. You shouldn't use the Forms assembly in a ASP.Net website.
Samuel
It's only to get a screenshot of another website... If you've got another idea I'd love to hear it
Birk
A: 

"Gah, you made me cringe there. You shouldn't use the Forms assembly in a ASP.Net website"...how about you give a reason to back your statement or else the statement is useless to anyone viewing it.

mjh