Results 1 to 6 of 6

Thread: Saving webpages

  1. #1

    Thread Starter
    Member
    Join Date
    Mar 2000
    Location
    Staffodshire, England
    Posts
    32

    Angry

    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

  2. #2
    Fanatic Member
    Join Date
    Feb 2000
    Location
    Japan
    Posts
    840
    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 Dwyer
    Network Engineer
    Aussie In Tokyo

    Using Powerbasic 6 & VB6 SP4 (Please also add your VB Version to your signature!)

  3. #3
    New Member
    Join Date
    Jan 2000
    Posts
    6

    Smile

    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.

  4. #4
    Guest
    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

  5. #5
    New Member
    Join Date
    Jan 2000
    Posts
    6
    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.

  6. #6
    Guest
    What do you mean? Look in your Object Browser for all the functions of ExecWB.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width