Click here to Skip to main content
15,902,635 members
Home / Discussions / C#
   

C#

 
AnswerRe: Image in WebBrowser Pin
Not Active11-Sep-09 6:18
mentorNot Active11-Sep-09 6:18 
GeneralRe: Image in WebBrowser Pin
AmirNapster11-Sep-09 6:47
AmirNapster11-Sep-09 6:47 
GeneralRe: Image in WebBrowser Pin
Not Active11-Sep-09 7:08
mentorNot Active11-Sep-09 7:08 
GeneralRe: Image in WebBrowser Pin
AmirNapster11-Sep-09 7:12
AmirNapster11-Sep-09 7:12 
GeneralRe: Image in WebBrowser Pin
Not Active11-Sep-09 7:50
mentorNot Active11-Sep-09 7:50 
GeneralRe: Image in WebBrowser Pin
AmirNapster11-Sep-09 7:56
AmirNapster11-Sep-09 7:56 
GeneralRe: Image in WebBrowser Pin
Not Active11-Sep-09 8:06
mentorNot Active11-Sep-09 8:06 
AnswerRe: Image in WebBrowser Pin
April Fans21-Sep-09 20:47
April Fans21-Sep-09 20:47 
1) c# WebClient Object, you can download the image by it.
2) of course, you can copy the image to Clipboard by webBrowser, it's not very good way.

IHTMLDocument2 doc = (IHTMLDocument2)ie.Document.DomDocument;
IHTMLControlRange imgRange;
HTMLBody body = (HTMLBody)doc.body;

Bitmap bmp = null;

foreach (IHTMLImgElement img in doc.images)
{
if (img.src.IndexOf("someinfo") > 0)
{
imgRange = (IHTMLControlRange)body.createControlRange();
imgRange.add((IHTMLControlElement)img);
imgRange.execCommand("Copy", false, null);
bmp = (Bitmap)Clipboard.GetDataObject().GetData(DataFormats.Bitmap);
}
}

if (null != bmp)
{

//deal with the Image
}
April

Comm100 - Leading Live Chat Software Provider


modified 27-May-14 22:03pm.

Question.net compact multi line text boxes Pin
faltopar11-Sep-09 5:21
faltopar11-Sep-09 5:21 
AnswerRe: .net compact multi line text boxes Pin
Richard MacCutchan11-Sep-09 5:52
mveRichard MacCutchan11-Sep-09 5:52 
AnswerRe: .net compact multi line text boxes Pin
April Fans21-Sep-09 20:51
April Fans21-Sep-09 20:51 
QuestionAccess a COM dll without registering it? Pin
DiscoJimmy11-Sep-09 4:38
DiscoJimmy11-Sep-09 4:38 
AnswerRe: Access a COM dll without registering it? Pin
J4amieC11-Sep-09 4:59
J4amieC11-Sep-09 4:59 
GeneralRe: Access a COM dll without registering it? Pin
DiscoJimmy11-Sep-09 5:02
DiscoJimmy11-Sep-09 5:02 
GeneralRe: Access a COM dll without registering it? Pin
J4amieC11-Sep-09 5:24
J4amieC11-Sep-09 5:24 
GeneralRe: Access a COM dll without registering it? Pin
Md. Marufuzzaman11-Sep-09 10:44
professionalMd. Marufuzzaman11-Sep-09 10:44 
GeneralRe: Access a COM dll without registering it? Pin
J4amieC11-Sep-09 10:54
J4amieC11-Sep-09 10:54 
AnswerRe: Access a COM dll without registering it? Pin
Henry Minute11-Sep-09 12:33
Henry Minute11-Sep-09 12:33 
QuestionAnybody know the command to insert an image into a byte [] array? Pin
gilvani11-Sep-09 4:29
gilvani11-Sep-09 4:29 
AnswerMessage Closed Pin
11-Sep-09 4:34
stancrm11-Sep-09 4:34 
GeneralRe: Anybody know the command to insert an image into a byte [] array? Pin
Member 1035577327-Jan-14 11:45
Member 1035577327-Jan-14 11:45 
Questionmake exe file Pin
ali_reza_zareian11-Sep-09 4:00
ali_reza_zareian11-Sep-09 4:00 
AnswerRe: make exe file Pin
Pete O'Hanlon11-Sep-09 4:13
mvePete O'Hanlon11-Sep-09 4:13 
NewsRe: make exe file Pin
ali_reza_zareian11-Sep-09 9:13
ali_reza_zareian11-Sep-09 9:13 
AnswerRe: make exe file Pin
stancrm11-Sep-09 4:13
stancrm11-Sep-09 4:13 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.