Need VB 6 code that will monitor what browser if being used..

What code can I use in my app (that will be running in the background) to tell what browser (IE, Firefox, Opera, Netscape) the user is currently running?
rbenderAsked:
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.

Mark_FreeSoftwareCommented:

you can do this in various ways,

enumerating all open windows and look for known strings,
Mozilla firefox, Internet explorer, Opera and so on,

or look what is set as the default browser
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
hesCommented:
default browser will not work
you will have to do as MFS said and enum all open windows
0
Shanmuga SundaramDirector of Software EngineeringCommented:
The default explorer path is stored in registry  in
HKey_classes_root\http\shell\open\command\default.

To do this in vb6. I suggest better download this source code
http://www.freevbcode.com/ShowCode.Asp?ID=3175
Make the textbox neary by searchstring empty (Donot give any input for searchstring)
Then in search location combo box select HKEY_CLASSES_ROOT
in the subkey give as "http\shell\open\command"
For eg.

Search string
Root Key  HKEY_CLASSES_ROOT
Sub Key "http\shell\open\command"

and click on start search. this will display the default explorer and its path. Good luck.

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.

rbenderAuthor Commented:
sorry..I may not have been clear...I need to know the immediate instance (on the screen, in use) of which browser the client is using. He may have 3 browsers installed, but what code will tell me which one of the 3 he is currently browsing with ?
0
hesCommented:
rbender,
What will happen if he is using more than one at a time. There is many times at home I will have FF and IE open and browsing different sites.
0
rbenderAuthor Commented:
good point..but for now...I'm not going to concern myself with that scenario.
0
Shanmuga SundaramDirector of Software EngineeringCommented:
rbender: the easiest way to find the opened window is to assign some known browser names as constants and use the findwind API to search in the opened windows for the browsers. This workaround will help you.
0
hesCommented:
shasunder,
That is exactly what
Mark_FreeSoftware {http:#20387957}
Said
0
Shanmuga SundaramDirector of Software EngineeringCommented:
sorry I really did not notice that. Thanks for your comment Hes. Any how, My motive is to help first. Points next. But at the same time I am sorry for the mistake that had happened.
0
Shanmuga SundaramDirector of Software EngineeringCommented:
Also please check this link that consists of the code that will find the mentioned window in the open windows and bring that window to front. This is just a suggestion to help you and not a solution

http://www.experts-exchange.com/Programming/Languages/Visual_Basic/Q_23018828.html
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.