|
#1
|
|||
|
|||
|
Getting an Image from webBrowser
Hello !
I would like to programmatically download and save the image webBrowser2.Url = new Uri("http://www.somewhere.com/images/captcha.png"); do { System.Threading.Thread.Sleep(100); } while (webBrowser2.IsBusy || !webBrowser2.DocumentStream.CanRead); Bitmap i = new Bitmap(webBrowser2.DocumentStream); i.Save("myimage.jpg"); what wrong with my code ? it dont work , hix . I want to use webBrowser to download image in this session because this image is randomly generated in every request, for example, if i open the page it show an image, if i refresh the page the image changes. I think the Stream from webBrowser is incorrect . webBrowser2.Url = new Uri("http://www.somewhere.com/images/captcha.png"); webBrowser2.DocumentStream <= this is not image stream . Have you another way to get correct image stream from webBrowser2 ? Thanks in advance |
|
#2
|
||||
|
||||
|
Try using the webclient/webRequest for Downlaoding file from remote server
http://www.csharpfriends.com/Article...?articleID=115
__________________
I don't answer coding questions via PM or Email. Please post a thread in the appropriate forum section. ![]() Please use [Code]your code goes in here[/Code] tags when posting code. Before posting your question, did you look here? Got a question on Linux? Visit our Linux sister site. Modifications Required For VB6 Apps To Work On Vista ![]() Microsoft MVP 2005/2006/2007/2008/2009 |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Get image url inside javascript from webbrowser control | freaky | .NET | 0 | 04-19-2008 05:50 AM |
| help regarding image processing | laxmi | Java | 6 | 02-03-2006 01:55 PM |
| Save image file from WebBrowser control | mechis | VB Classic | 4 | 01-26-2006 07:29 PM |
| How do I Automatically Resize a control Button Image? | James Graham | .NET | 3 | 03-18-2002 11:05 AM |
| Script for scrolling | Mark | Web | 3 | 08-30-2001 12:45 PM |