Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

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

Posted on 2007-12-01
14
Medium Priority
?
190 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
[X]
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
  • 4
  • 3
  • 2
  • +1
14 Comments
 
LVL 13

Accepted Solution

by:
Mark_FreeSoftware earned 120 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
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 

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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

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…
When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
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…
Suggested Courses

722 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