Solved

Intercept address line for Internet Explorer

Posted on 2004-08-25
19
570 Views
Last Modified: 2011-09-20
How can i find out what address has just been typed into internet explorer
and then alter the address and then resubmit.

Code For vb6 please


Id like to intercept the address line

thanks experts.




0
Comment
Question by:Jimmyx1000
  • 8
  • 6
19 Comments
 

Author Comment

by:Jimmyx1000
ID: 11898406
Id like to design some parental software

Once i have the address id like to check this address against a list of
known adult sites and then stop the page or redirect to a safe page.

thanks experts



0
 
LVL 3

Expert Comment

by:nichia
ID: 11898613
IE has content control.
Tools->Internet Options->[Content]

You can choose sites to allow or disallow, etc.

Hope it helps.
0
 
LVL 3

Expert Comment

by:nichia
ID: 11898702
This snippet may also help you



Option Explicit

'You must first add a reference to Microsoft Internet Controls from the Project->References menu
Private Sub Command1_Click()
    Dim shWnd As New ShellWindows
    Dim ie As InternetExplorer
    Dim sURL As String
   
    For Each ie In shWnd
        sURL = ie.LocationURL
        sURL = LCase(sURL)
        'Redirect all EE windows to excite.com
        If InStr(1, sURL, "experts-exchange") Then
            ie.Navigate2 "http://www.excite.com"
        End If
    Next
End Sub
0
 

Author Comment

by:Jimmyx1000
ID: 11899086
what i need is vb to check externally the condition of internet explorer

when an address is actually typed in internet explorer after the return key is pressed
i need to know that return has been pressed and then manipulate this intercept
and then return a value or new address to internet explorer .

thanks experts

0
 
LVL 3

Accepted Solution

by:
nichia earned 500 total points
ID: 11899419
You could create a "Browser Helper Object" to do this.

If you are up for the challenge I can point you in the right direction.  Basically, the BHO is a process which is loaded by every instance of IE (via a registry entry).  BHO's are what popup blockers and other net nannys use to modify or "help" the behavior of Internet Explorer.

It's not so easy, but doable.

I have found a good working example using VB at this site:

http://www.visualbasicforum.com/t53876.html

Download the sample program (bho sample.zip) and we will take it from there. (you need to register as a member, but it's free)

Basically, this sample intercepts the BeforeNavigate2 event of the browser - which is exactly what you want.  I tried it and it works well.  Go ahead and load the program and I will talk you throught the process.

Later -

0
 

Author Comment

by:Jimmyx1000
ID: 11902533
Ok Downloading Now.

Id love to do this stuff  nichia
0
 

Author Comment

by:Jimmyx1000
ID: 11903701
Ok program download what should i do now

can get this to work

how can i get this to work.
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 3

Expert Comment

by:nichia
ID: 11904012
Here is a step-by-step of how I got it to work.

1.  Close all open IE windows.
2.  Double click on the file register.reg (which came with the example) to add the entry for this BHO to the registry.
3.  Double click browserhelper.vbp to open the project in VB
4.  Find the section of code in the moBrowser_BeforeNavigate2 event.
     This code is what we will be most interested in.
     Comment out the MsgBox Cstr(URL) line.
     Add this for testing:
     Beep
     Debug.print CStr(URL)
5.  Run the project.
6.  Open an Internet Explorer window.  
     You should hear a beep just before it loads, and the URL(s) will print out in the debug window.
     When you are done, close the IE windows, then stop the project.

Let me know how you make out.
0
 
LVL 3

Expert Comment

by:nichia
ID: 11904049
PS

Double click un-register.reg to remove the registry entries for this BHO (optional).
0
 
LVL 3

Expert Comment

by:nichia
ID: 11930806
Did you get this to work yet?
0
 
LVL 3

Expert Comment

by:nichia
ID: 11946455
Please let me know if you need more help getting this to work.
0
 

Author Comment

by:Jimmyx1000
ID: 12041001
Hello

Just trying this program , im trying to redirect the web page  to a diffrent one ,

do you know how  i can do this using the above program

thanks.


0
 
LVL 3

Expert Comment

by:nichia
ID: 12071720
Yes I do.
0
 

Author Comment

by:Jimmyx1000
ID: 12181885
How can i change the code so i geta redirect
0
 
LVL 5

Expert Comment

by:perezjos
ID: 12427974
he may be in jail by now .... :)

jose
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
VBA Excel: Copy Data from one workbook to another v6 csv extension 15 77
Use Multiple Forms 4 48
Access 2016 VB code 9 102
Add a task in Outlook from access 11 35
There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

929 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now