Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 191
  • Last Modified:

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?
0
rbender
Asked:
rbender
  • 4
  • 3
  • 2
  • +1
1 Solution
 
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
 
hesCommented:
default browser will not work
you will have to do as MFS said and enum all open windows
0
 
Shanmuga SundaramCommented:
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 Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

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

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

  • 4
  • 3
  • 2
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now