Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Webbrowser control - supress image downloading
Message
From
27/10/2006 00:55:55
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Internet applications
Title:
Webbrowser control - supress image downloading
Miscellaneous
Thread ID:
01164905
Message ID:
01164905
Views:
72
Greetings,

I'm using a webbrowser control hosted in a VFP 8 form. When I load a page in the webbrowser I use the DOM to loop through the nodes of the img tags to find the image files. Then I pass the node on to a HTTP download to pull the pic and write it out to the file. All works fine except for one problem. The image is getting downloaded twice. Once for the page when it loads in the browser and the other when I pull the image through HTTP. I want to only download the pic once. I don't need to see the image if I'm pulling it so supressing the image in the webbrowser control works for my solution. I found this on the webbrowser control to supress the image downloading.

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 combination of following flags, using the bitwise OR operator, to indicate your preferences.

DLCTL_DLIMAGES, DLCTL_VIDEOS, and DLCTL_BGSOUNDS: Images, videos, and background sounds will be downloaded from the server and displayed or played if these flags are set. They will not be downloaded and displayed if the flags are not set.

http://msdn.microsoft.com/library/default.asp?url=/workshop/browser/hosting/wbcustomization.asp


The problem is I have no idea at all how to implement this in VFP. Any ideas on how to approach this?

Thanks in advance!

Greg
Next
Reply
Map
View

Click here to load this message in the networking platform