-
Im working on a program that displays most types of media,
you can view web pages in the program, but they have to be saved on the computer.
How can i save a web page on the computer by entering the name of it in a text box.
Thanks in advance
Mak_Dep :) :p
-
Use the Inet control's OpenUrl function. It doesn't get the pictures though, you'll have to scan the html and get the links, then download them separately.
Although I seem to recall someone having some way around that, you might want to do a search of some of the old forum posts here.
-
Paul is right. It sounds like the long way around, but it's actually very fast. Use the Inet control to download the main HTML page to a file, read the file and look for image tags (remember that they may be using relative addressing and there may be more than one image tag per line). Then use the Inet control to download any image files found in the HTML page, then rewrite the HTML page to point to the files you've downloaded. Then start IE with your new HTML page. Even with a 26,600 connection, this all takes place quickly.
-
There is a way to save the web page and pictures to a computer. Use the SHDOCVW.DLL control (Webbrowser).
Code:
webbrowser1.ExecWB OLECMDID_SAVEAS, OLECMDEXECOPT_PROMPTUSER
-
I could not get the EXECWB commands to work exactly the way I wanted them to. Can't remember exactly what the problems were, but they had to do with getting prompts when they weren't wanted, or not being able to save under the name I wanted to use. But you're right, it does work if you don't mind these minor annoyances.
-
What do you mean? Look in your Object Browser for all the functions of ExecWB.