473,326 Members | 2,061 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

WebBrowser control

Hi all,

I'm having some dificulties in using the webbrowser control to save an image
file which is displayed in the control. If someone could tell me what I'm
doing wrong it would be great.

I have the webbrowser wb2 in a form and using the navigate2 method I have
loaded a jpg image file. It works fine.
Now I am trying to save this image by executing:
Dim param() As Object = {"E:\VBDemos\Internet", "Test.jpg"}

wb2.ExecWB(SHDocVw.OLECMDID.OLECMDID_SAVEAS,
SHDocVw.OLECMDEXECOPT.OLECMDEXECOPT_DONTPROMPTUSER , param)

But there is no way to not prompt the user !

Maybe I am passing the param array in a wrong way. I really can't see what
can be wrong.

Any ideas ????

Thanks.
Nov 20 '05 #1
6 4321
I'm pretty sure the browser will not let you do this, even when you specify
that no prompt should be displayed (IOW, that flag is ignored). I think I
remember this from the VB6 groups where it was a common problem. Have you
tried Google?

--
____________________
Klaus H. Probst, MVP
http://www.vbbox.com/

"Newton Godoy" <ne**********@aspect.com.au> wrote in message
news:OR**************@TK2MSFTNGP10.phx.gbl...
Hi all,

I'm having some dificulties in using the webbrowser control to save an image file which is displayed in the control. If someone could tell me what I'm
doing wrong it would be great.

I have the webbrowser wb2 in a form and using the navigate2 method I have
loaded a jpg image file. It works fine.
Now I am trying to save this image by executing:
Dim param() As Object = {"E:\VBDemos\Internet", "Test.jpg"}

wb2.ExecWB(SHDocVw.OLECMDID.OLECMDID_SAVEAS,
SHDocVw.OLECMDEXECOPT.OLECMDEXECOPT_DONTPROMPTUSER , param)

But there is no way to not prompt the user !

Maybe I am passing the param array in a wrong way. I really can't see what
can be wrong.

Any ideas ????

Thanks.

Nov 20 '05 #2
Cor
Hi Newton,

You can have a look for mshtml on MSDN, but it is a hard way to go.

Cor
Nov 20 '05 #3
* "Newton Godoy" <ne**********@aspect.com.au> scripsit:
I'm having some dificulties in using the webbrowser control to save an image
file which is displayed in the control. If someone could tell me what I'm
doing wrong it would be great.

I have the webbrowser wb2 in a form and using the navigate2 method I have
loaded a jpg image file. It works fine.
Now I am trying to save this image by executing:
Dim param() As Object = {"E:\VBDemos\Internet", "Test.jpg"}

wb2.ExecWB(SHDocVw.OLECMDID.OLECMDID_SAVEAS,
SHDocVw.OLECMDEXECOPT.OLECMDEXECOPT_DONTPROMPTUSER , param)

But there is no way to not prompt the user !


Why not download the image file without loading it into the webbrowser
control?

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>
Nov 20 '05 #4
Cor
Hi

Download with VB.net

http://msdn.microsoft.com/library/de...dfiletopic.asp
Why not download the image file without loading it into the webbrowser
control?


Cor
Nov 20 '05 #5


Hi,

Let me explain why I am using this webbrowser to save images files. I
have two web brosers in my form. In the first one the user navigates to
any web page he wants, then I have code to get all the images in that
web page and add the src to a list box. Now when the user clicks an item
in the list box, the image is loaded in the second webbrowser and if he
wants to save it locally in his machine he clicks a button with code
similar to the one I am trying to make work. The problem is that it
seems that there is no way to avoid the user to be prompted with a Save
As dialog box, and if this message box is displayed I would have no way
to force all the images to be saved in the same folder and this is an
important requirement.
Maybe I will have to save it by other means.
Is it really impossible to stop the save as to be displayed ?

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 20 '05 #6
Cor
Hi Newton,

That "save as" is (was I have worked around it I thougth) is(was) for me a
problem also.

I thought that the documentation says that you can put that off, but I never
succeeded in that. So I have always thougth that I misreaded it.

Sorry I cannot help you with this.

Cor
Nov 20 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Noozer | last post by:
I've got a WebBrowser control (AxBrowse - VCMAXB.DLL) and I'm having a few difficulties with it. Just looking for a few pointers, not whole solutions here. I've tried looking at the MSDN help files...
4
by: Randy | last post by:
Hi, ok, I found a way to connect to a running instance of an (external) Internet Explorer and access - for example - the html source. That works fine! But now I have running application with...
9
by: ASP .NET Newbie | last post by:
How can I run a WebBrowser control using ASP.NET/VB.NET? I know I can use the WebClient to get the page data, but I need to be able to use the WebBrowser (AxWebBrowser)? Thanks, Chad
0
by: Jim Hubbard | last post by:
How would I implement the IDispatch interface to handle the following in VB.Net <BEGIN> Controlling Download and Execution The WebBrowser Control gives you control over what it downloads,...
12
by: Alex Clark | last post by:
Greetings, (.NET 2.0, WinXP Pro/Server 2003, IE6 with latest service packs). I've decided to take advantage of the layout characteristics of HTML documents to simplify my printing tasks, but...
8
by: Prosperz | last post by:
Hi, I would like to make thumbnails of web page by capture content of a WebBrowser. By example, capture http://www.google.com. I used WebBrowser control with Framework 2.0. I try this : ...
1
by: L. Chernov | last post by:
Hello, I am trying to work with .Net 2005 WebBrowser object, and put it on a "Windows control library" (embedded in a user control class) and then I am executing it from an ASP.Net webform(with...
11
by: Anil Gupte | last post by:
....and how do I insert one into my form? I used in VB 6.0 last, but cannot figure out where it is in .Net Thanx, -- Anil Gupte www.keeninc.net www.icinema.com
4
by: Steve Richter | last post by:
I would like to build an HTML stream as a string and have the WebBrowser control render that HTML. Then on PostBack, or whatever it is called, I would like my code to be the one that receives what...
5
by: kimiraikkonen | last post by:
Hi, I couldn't find a necessary class which shows when mouse hovers on a link in Webbrowser control. Think of there's a status bar(text), when mouse comes on a link, the URL must be shown in...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.