Thanks for replaying. But the thing is I do not want to download the image again. IWebBrowser control downloaded the image already. I want to save form IWebBrowser not download it from internet again.
voo doo12
Posts
-
How to save IHTMLELEMENT of Tag IMG -
How to save IHTMLELEMENT of Tag IMGHi every one. I'm tring to save IHTMLElement which has IMG tag to hard drive. I'm not tring to save the entire web page as image. NO. I'm tring to save single image (IHTMLElement of Tag IMG) to hard drive. I tried IHTMLElementRender::DrawToDC(), but it works only if the IHTMLElement size is less than the physical size of my computer screen. If the IHTMLElement (the single image or picture) size is larger than my computer's screen, the function ( DrawToDC() ) draws partial image. Any help???????? Thanks
-
how to save IHTMLElement of Tag IMGHi every one. I'm tring to save IHTMLElement which has IMG tag to hard drive. I'm not tring to save the entire web page as image. NO. I'm tring to save single image (IHTMLElement of Tag IMG) to hard drive. I tried IHTMLElementRender::DrawToDC(), but it works only if the IHTMLElement size is less than the physical size of my computer screen. If the IHTMLElement (the single image or picture) size is larger than my computer's screen, the function ( DrawToDC() ) draws partial image. Any help???????? Thanks
-
How to Save Picture(Image)Actually, I'm tring to save individual images in a web page. The problem is if any individual image is larger than the physical size of my computr's screen, IHTMLElementRender::DrawToDC() only draws to the size of my computer screen size. So I ended up with partial image. Do you konw how to save an entire image?
-
How to Save Image from WebBrowser controlThanks very much. I'm not familiar with MFC but I will be. Thanks again
-
How to Save Image from WebBrowser controlCan you show me how I could save image(picture) from webbrowser control using MFC?
-
How to Save Picture(Image)Hi everyone I've a project where i have webBrowser control to display web page contents. When a user wants to save pictures(image(s)) to hard drive instead of he/she right clicking the picture(image) and clicking 'Save Picture As...', I have a button the user click that button and programatically saves the picture(image). I googled, post my question at MSDN, here, for a year and half no luck. I found some codes but they only save the portion of picture (image) which is displayed by screen. When ever the picture(image) is larger than the computer's physical screen size, I endes up saving partial picture(image). This forum seems more live than any other forum I know. Please help. Help.
-
How to Save Image from WebBrowser controlI did. But no one seems to know.
-
Get the button click event from another formthere is simplest way if you are still enterested
-
loop through comboboxesHave you tried this code
for each(ComboBox^ box in this->Controls)
{
if(box->GetType() == ComboBox::typeid)
{
box->Items->Clear();
}
} -
How to Save Image from WebBrowser ControlHi everybody. I'm tring to save image form webBrowser control. and i have the following code
mshtml::HTMLDocument^ document = dynamic_castmshtml::HTMLDocument^(this->webBrowser1->Document->DomDocument);
mshtml::IHTMLElementCollection^ collImages = document->getElementsByTagName(L"img");
for(int i = 0; i < collImages->length; ++i)
{
mshtml::IHTMLImgElement^ img = safe_castmshtml::IHTMLImgElement^(collImages->item(nullptr, i));mshtml::IHTMLElementRender^ render = dynamic\_cast<mshtml::IHTMLElementRender^>(img); Bitmap^ bmp = gcnew Bitmap(img->width, img->height); Graphics^ g = Graphics::FromImage(bmp); IntPtr hdc = g->GetHdc(); render->DrawToDC(hdc); //Here is the Error g->ReleaseHdc(hdc); delete g; g = nullptr; bmp->Save(L"C:\\\\Test\\\\SaveImage.Jpg", System::Drawing::Imaging::ImageFormat::Jpeg);
}
I get the following error message Error C2664: 'mshtml::IHTMLElementRender::DrawToDC' : cannot convert parameter 1 from 'System::IntPtr' to 'mshtml::_RemotableHandle %' is there any one who knows how to fix this?
-
How to Save Image from WebBrowser controlHi everybody. I'm tring to save image form webBrowser control. and i have the following code
mshtml::HTMLDocument^ document = dynamic_castmshtml::HTMLDocument^(this->webBrowser1->Document->DomDocument);
mshtml::IHTMLElementCollection^ collImages = document->getElementsByTagName(L"img");for (int i = 0; i < collImages->length; ++i)
{
mshtml::IHTMLImgElement^ img = safe_castmshtml::IHTMLImgElement^(collImages->item(nullptr, i));
mshtml::IHTMLElementRender^ render = dynamic_castmshtml::IHTMLElementRender^(img);Bitmap^ bmp = gcnew Bitmap(img->width, img->height);
Graphics^ g = Graphics::FromImage(bmp);
IntPtr hdc = g->GetHdc();
render->DrawToDC(hdc); //Here is the Error
g->ReleaseHdc(hdc);
delete g; g = nullptr;
bmp->Save(L"C:\\Test\\SaveImage.Jpg", System::Drawing::Imaging::ImageFormat::Jpeg);
}I get the following error message Error C2664: 'mshtml::IHTMLElementRender::DrawToDC' : cannot convert parameter 1 from 'System::IntPtr' to 'mshtml::_RemotableHandle %' is there any one who knows how to fix this?
-
how to save image from webBrowser ControlHi every body is there any way to save image form webBrowser control with out reloading it?
-
how to save image from webBrowser ControlHi everybody I'm trying to save image from webBrowser control which I have in my project. I could do it by right clicking on the image and selecting "Save Picture As..." context menu, except I wanted to do it programmatically. I found a solution like this: this->webBrowser1->Document->execcommand("Save As", false, strFilePath); but it doesn't work (it always show save as dialog box - I do not want a save as dialog box to show up). Some one has better idea?
-
how to save image from webBrowser ControlHi I'm trying to save image from webBrowser control after a open webpage. It is like right clicking on the picture and clicking at "Save Picture As..." Context menu, except I wanted to do it programmaticaly with out showing save dialog box. I tried this->webBrowser1->Document->execcommand("Save As", false, strFilePath); it does not work. Some one Knows better way?