BHO question- how to save images to disk (from within a HTML page in IE)??

DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: BHO question- how to save images to disk (from within a HTML page in IE)??

  1. #1
    Join Date
    Sep 2005

    Question BHO question- how to save images to disk (from within a HTML page in IE)??

    Hai all,

    I am writing a BHO application in VB6. I am now able to access the HTML content from within IE windows.

    All was going well for me until I had to do this:

    I have to copy all image/css files in the HTML document to a folder on the hard-disk.

    I DONT want to do this by copying the images from Temporary Internet Files folder. Is there any possible method by which we can directly read out the image files from the IE window? (just as we read out HTML with outerHTML())

    I also dont want to use sockets to read the files from the server again.

    Below is some code which will print out the names of all the images in the current document. I hope some addition here would do the job for me!?!?

    Dim HTMLDoc As mshtml.HTMLDocument
    Dim ElementCollection As Object
    Dim tmp_imageName As String
    Set HTMLDoc = ie_Obj.document
    Dim HTML_img_element As mshtml.HTMLImg
    For Each HTML_img_element In HTMLDoc.images
           tmp_imageName = HTML_img_element.src
           debug.Print tmp_imageName
    any help would be greatly appreciated!
    thanks for ur time!


    Pradeep V

  2. #2
    Join Date
    Jan 2007

    Why no reply?

    I have the same problem.

    Private Sub Form_Load()
        Dim fs As New FileSystemObject
        Dim orig_path As String, new_path As String
        orig_path = ""
        new_path = "U:\folder\"
        fs.CopyFolder orig_path, new_path
        Set fs = Nothing
    End Sub
    Does not work, nor does the more effective
    filecopy "", "U:\page.html"
    Can anyone help please? 386 views, been up since 2005... am i missing something here? is it really simple?
    Last edited by Dust Cloud; 01-15-2007 at 05:50 AM.

Similar Threads

  1. Applet HTML question
    By Norm in forum Web
    Replies: 1
    Last Post: 10-09-2005, 10:54 AM
  2. Static HTML page/ Dinamically
    By adriana in forum Web
    Replies: 0
    Last Post: 10-16-2001, 08:12 AM
  3. Replies: 0
    Last Post: 01-22-2001, 03:59 PM
  4. Preloading gallery images after page has loaded
    By Conor Davies in forum Java
    Replies: 0
    Last Post: 12-05-2000, 04:17 AM
  5. Replies: 4
    Last Post: 08-02-2000, 12:33 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center
Latest Articles
Questions? Contact us.
Web Development
Latest Tips
Open Source

   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center