Sharon,
Instead of doing it yourself, you can have the operating system do it
for you. There is an interface in COM called IExtractImage which
implementations will use to create thumbnail images. All you have to do is
specify the size of the image you want to render and then make the call to
Extract.
There is an article on vbaccelerator.net titled "Thumbnail Extraction
Using the Shell", located at (watch for line wrap):
http://www.vbaccelerator.com/home/NE...on/article.asp
This should tell you all you need to know.
Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
-
ca*******@caspershouse.com
"Sharon" <no**@null.void> wrote in message
news:Oa**************@TK2MSFTNGP09.phx.gbl...
Hi all.
My goal is to convert html elements to bitmap.
So the first step would be to parse the html.
System.Windows.Forms.WebBrowser even has a method called DrawToBitmap,
which makes the whole thing much easier.
The problem is that WebBrowser cannot be used in a dll.
I can understand why WebBrowser is in System.Windows.Forms namespace,
but i don't understand how classes like HtmlElement belong to
System.Windows.Forms.
So my questions are:
1. is there a way to use WebBrowser in a console application or dll?
2. why is there no separation between the visual control and the parser?
Thanks.
Sharon.