Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

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

Posted on 2007-12-01
14
186 Views
Last Modified: 2010-04-30
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?
0
Comment
Question by:rbender
  • 4
  • 3
  • 2
  • +1
14 Comments
 
LVL 13

Accepted Solution

by:
Mark_FreeSoftware earned 30 total points
ID: 20387957

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
 
LVL 20

Expert Comment

by:hes
ID: 20389476
default browser will not work
you will have to do as MFS said and enum all open windows
0
 
LVL 17

Expert Comment

by:Shanmuga Sundaram
ID: 20396753
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
Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 

Author Comment

by:rbender
ID: 20402573
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
 
LVL 20

Expert Comment

by:hes
ID: 20402636
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
 

Author Comment

by:rbender
ID: 20405629
good point..but for now...I'm not going to concern myself with that scenario.
0
 
LVL 17

Expert Comment

by:Shanmuga Sundaram
ID: 21131969
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
 
LVL 20

Expert Comment

by:hes
ID: 21132379
shasunder,
That is exactly what
Mark_FreeSoftware {http:#20387957}
Said
0
 
LVL 17

Expert Comment

by:Shanmuga Sundaram
ID: 21133265
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
 
LVL 17

Expert Comment

by:Shanmuga Sundaram
ID: 21133283
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

Featured Post

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
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…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
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…

839 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