Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Internet explorer cached files

Posted on 2001-06-14
4
Medium Priority
?
193 Views
Last Modified: 2012-05-04
Hi now im at it again,

I am building my own internal browser and need to add save functionality now since an image already has been downloaded to a chache directory there is no point in downloading it from the net again. There for my broblem.
How to get the corresponding filename from the disk. I am using:

htmlWin.event.srcElement.NameProp to get the image name, now internet explorer sometimes renames the files when chaching it an image called banner1.jpg may actually be named banner1[1].jpg on the disk my first question is: is the 1 inside [] the property: htmlWin.event.srcElement.uniqueNumber? or something else.
Next question is: are there a good way to know where the chache directory is? I now that there is a key in the registry under HKEY_Local_Machine\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings\Cache\Paths called Directory but I have noticed that internet exlorer sometimes creates subdirectories and puts the file in there (and ofcourse there are the cache1, cache2, cache3 ... directories)

regards
/Claes


Or mayby there is a way to catch a ondownload event for every object on the html page and steer my browser to cache its files in a different directory? I am using
Webbrowser, htmlDoc and htmlWindow2 components..

Or mayby I could convert the htmlImg to a real Image and save it to disk is this possible?
how to set Image1 = htmlImg?
0
Comment
Question by:clylv
  • 2
  • 2
4 Comments
 
LVL 6

Expert Comment

by:andyclap
ID: 6190042
Just a quick comment - if you're using the web browser control, it will take care of cacheing for you. If an image is available in the cache, and you're not doing a full refresh, it should pick it up from there rather than doing a GET from the server.
0
 

Author Comment

by:clylv
ID: 6190074
andyclap I now this but MY program needs to get a hold of it (the image) now how I can extract it from the webbrowser control into an Image control?
0
 
LVL 6

Accepted Solution

by:
andyclap earned 150 total points
ID: 6190194
Sorry, I misunderstood the question a bit.
There's some sample code for reading the internet cache at
http://www.vbusers.com/code/codeget.asp?ThreadID=209&PostID=1&NumReplies=0

It should give you some pointers as to how to use wininet.dll's cache functions (which are a bit of a pain as they're not very VB friendly).


0
 

Author Comment

by:clylv
ID: 6190386
andyclap: it is as u say "not very VB friendly" but never the less IT WORKS perfectly

thanx
/Claes
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Suggested Courses

971 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question