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!?!?
any help would be greatly appreciated!Code: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 Next
thanks for ur time!