|
-
Sep 4th, 2009, 02:16 PM
#1
Thread Starter
PowerPoster
Blocking images with webbrowser?
I've done a search on here for suggestions on how to do this, but haven't had much luck...I found this:
Code:
Dim I As Long
With webbrowser1.Document.images
For I = 0 To .length - 1
.Item(I).removeAttribute "src"
Next I
End With
The problem is this loads the images and then removes them...I am trying to speed up my program by making it NOT load the images at all.
http://social.msdn.microsoft.com/For...5-3e95845c5324 gives the solution of disabling inline images, which I know is doable but this is where I get more needy...I want to selectively disable images based on a list of images I don't want loaded rather than have them all disabled, if possible...has anyone got suggestions?
One suggestion that was made was to load the HTML then remove what I didn't want and then load the HTML into the browser window, but this isn't an option as I have no way to load the HTML from the webbrowser until it is finished downloading the page...or is there a way using beforenavigate which will work? The problem with beforenavigate and using another method for downloading the HTML is that the site I am working with expects all sorts of cookies and referer tags and stuff, so it NEEDS to be downloaded by the webbrowser so really I need to catch the HTML as soon as it is downloaded then do the work THEN display it without the images I have removed.
Any suggestions or thoughts would be appreciated, and I'll use the suggestion made on MSDN for now :-)
Well, everyone else has been doing it :-)
Loading a file into memory QUICKLY - Using SendKeys - HyperLabel - A highly customisable label replacement - Using resource files/DLLs with VB - Adding GZip to your projects
Expect more to come in future
If I have helped you, RATE ME! :-)
I love helping noobs with their VB problems (probably because, as an amateur programmer, I am only slightly better at VB than them :-)) but if you SERIOUSLY want to get help for free from a community such as VBForums, you have to first have a grounding (basic knowledge) in VB6, otherwise you're way too much work to help...You've got to give a little if you want to get help from us, in other words!
And we DON'T do your homework. If your tutor doesn't teach you enough to help you make the project without his or her help, FIND A BETTER TUTOR or try reading books on programming! We are happy to help with minor things regarding the project, but you have to understand the rest of it if you want our help to be useful.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|