473,804 Members | 3,809 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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\In ternet", "Test.jpg"}

wb2.ExecWB(SHDo cVw.OLECMDID.OL ECMDID_SAVEAS,
SHDocVw.OLECMDE XECOPT.OLECMDEX ECOPT_DONTPROMP TUSER, 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 4343
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**********@a spect.com.au> wrote in message
news:OR******** ******@TK2MSFTN GP10.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\In ternet", "Test.jpg"}

wb2.ExecWB(SHDo cVw.OLECMDID.OL ECMDID_SAVEAS,
SHDocVw.OLECMDE XECOPT.OLECMDEX ECOPT_DONTPROMP TUSER, 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**********@a spect.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\In ternet", "Test.jpg"}

wb2.ExecWB(SHDo cVw.OLECMDID.OL ECMDID_SAVEAS,
SHDocVw.OLECMDE XECOPT.OLECMDEX ECOPT_DONTPROMP TUSER, 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
7557
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 with little success. - When a new window is trying to pop up, how do I determine the target URL? How can I get the page to open in the current browser control? - When printing from the webbrowser control is there a way to ensure it prints...
4
2889
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 an embedded IE webBrowser Control. Is there a possibility for my application to access the webBrowser control in the other application, too? Thanks in advance, Randy
9
3814
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
3483
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, displays, and executes. To gain this control, you need to implement your host's IDispatch so it handles DISPID_AMBIENT_DLCONTROL. When the WebBrowser Control is instantiated, it will call your IDispatch::Invoke with this ID. Set pvarResult to a...
12
6384
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 of course it's thrown up a whole host of new issues... I'm generating a multi page printable document in HTML from my app, and displaying it in a WebBrowser control. I've looked into using some CSS
8
3424
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
3309
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 IE6) with the following object tag: <OBJECT id="ModPkiObj" height="550" width="800" classid="http:ModPkiNew.dll#Mod.Online.Client.ModPkiNew.SignForm" name="ModPkiObj" VIEWASTEXT>
11
2848
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
12012
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 the WebBrowser control is sending. Effectively, my code would be the web server and the WebBrowser control would be the web client. All the examples I am seeing have the WebBrowser control being directed to a URL from which to get the HTML...
5
8082
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 this status bar. How can i do this? Thanks.
0
9706
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9577
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
10315
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10075
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6847
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5519
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5651
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4295
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3815
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.