|
-
Apr 5th, 2006, 05:16 PM
#1
Thread Starter
Addicted Member
Removing Images From Browser
Ok so heres my problem. I have an https that creates a popup because non secure http images are being stored on the website. How can I make it so that I can suspend the images from the site that I am going to. This needs to happen for my automated program to work.
Thanks a Bunch
messup000
Last edited by messup000; Apr 5th, 2006 at 10:20 PM.
-
Apr 5th, 2006, 10:21 PM
#2
Thread Starter
Addicted Member
Re: Removing Images From Browser
I know that you can do it in IE but can I do it without affecting IE and make it temporary
-
Apr 5th, 2006, 11:20 PM
#3
Disable Images In Webbrowser
You can do it by changing the image locations in the DOM.
VB Code:
' Place this code in a form and add a WebBrowser Control, _
' a picturebox and a Command button
' Set the pictureboxs appearance = Flat, BackColor = White and Visible = False
Option Explicit
'======================================================================
Private Sub Form_Load()
WebBrowser1.Navigate "about:blank"
Picture1.Move WebBrowser1.Left, _
WebBrowser1.Top, _
WebBrowser1.Width, _
WebBrowser1.Height
End Sub
'======================================================================
Private Sub Command1_Click()
' [b]WebBrowser1.Visible = False[/b] -> we can not use it. It has some bugs
Picture1.Visible = True
WebBrowser1.Left = Screen.Width + 1000 'move it out of screen instead
WebBrowser1.Navigate "http://www.yahoo.com"
End Sub
'======================================================================
Private Sub WebBrowser1_DocumentComplete(ByVal pDisp As Object, _
URL As Variant)
Dim i As Integer
'Wait till document has loaded
If pDisp = WebBrowser1 Then
'Loop through images
For i = 0 To WebBrowser1.Document.Images.length - 1
[b]WebBrowser1.Document.Images.Item(i).src = "C:\WINDOWS\Web\Tips.gif" 'or anything else, even a null string[/b]
Next i
Picture1.Visible = False
WebBrowser1.Left = Picture1.Left
End If
End Sub
'======================================================================
Last edited by iPrank; Apr 6th, 2006 at 12:02 AM.
-
Apr 6th, 2006, 09:07 PM
#4
Thread Starter
Addicted Member
Re: Removing Images From Browser
thanks Iprank that works but is there a way to do this before the page is loaded?
I am loading it from a login so is there a way for the program to login and then directly maybe redirect to a different url?
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
|