Navigate URL . . . . .

Hi,

I have a small problem, (i m not good in english but), if i have open 3 IE(Internet Explorer) ,
1. yahoo.com
2. msn.com
3. hotmail.com

if 2nd explorer change url from msn.com to msn.com/asd/sdf.srf etc. so when it change then i want to navigate my own url to the 2nd explorer means when 2nd explorer changing then i want to my software detect it and navigate my url "experts-exchange.com" so how can i do this thats not for 2nd explorer randomly if any one of explorer process some thing then my software read or detect process of explorer and detect explorer id and navigate my own url so how can plz any one help me.

if any one not understan my english then post comments. i'll be try best for him/her.

Thanks and waiting for ur response.
stingkhanAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

BrianGEFF719Commented:
You need to create a browser helper object, this cannot be done in visual basic, its typically done in C++.

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnwebgen/html/bho.asp



-Brian
0
Erick37Commented:
A BHO can be written in VB with a little help:

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

Reference:
Browser Helper Objects: The Browser the Way You Want It
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnwebgen/html/bho.asp
0
stingkhanAuthor Commented:
Thanks for reply,

Thats not enogh i want to do it in vb and must do it. any more help plz.

Thanks
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

stingkhanAuthor Commented:

Erick and BrianGEFF719 u r in top list plz solve my problem
0
Erick37Commented:
If you want to look at each running instance of IE and view and or modify the location URL, then you have 2 options which I know of:

1) Use a Browser Helper Object.  This runs inside IE and can tap into the navigate events directly.  Difficult to do in VB, but the link above shows how.

2) Use a standard VB program to loop through each running instance of IE and view / modify the location URL.  This is not event driven, so you will have to use polling with a timer or some other method to run the code.

Example of #2

'From the Project->References menu, add a reference to "Microsoft Internet Controls"

Dim shWnd As New ShellWindows
Dim ie As InternetExplorer

'Loop through each Explorer window
For Each ie In shWnd
    'Filter out Windows Explorer windows
    If InStr(1, LCase(ie.FullName), "iexplore.exe") Then
        Debug.Print ie.LocationURL
       
        'Do something with ie here: redirect all EE browsers to google.com
        If InStr(1, LCase(ie.LocationURL), "experts-exchange.com") Then
            ie.Navigate2 "http://www.google.com"
            Do While ie.ReadyState <> READYSTATE_COMPLETE: DoEvents: Loop
        End If
       
    End If
Next
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
stingkhanAuthor Commented:

Erick u r gr8, ur code is not for my project but i got an idea from it and finish my project.

thanks Erick

and also thanks BrainGeff : )
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic Classic

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.