Solved

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

Posted on 2007-12-01
14
189 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 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
Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

 

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: 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.

Question has a verified solution.

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

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…
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
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…
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…
Suggested Courses
Course of the Month9 days, 18 hours left to enroll

623 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