Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Webbrowser Handle

Posted on 2008-10-03
5
Medium Priority
?
470 Views
Last Modified: 2012-05-05
1.) How do i determine the default webBrowser?

2.) How can I determine if the Default webBrowser (Or any webbrowser for that matter) is active

3.) How can I get the handle of the browser?
0
Comment
Question by:geocoins-software
[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
  • 3
  • 2
5 Comments
 
LVL 21

Expert Comment

by:ziolko
ID: 22636331
1)
to get default browser you have to check registry:
go to HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings
and read "User Agent" value

alternatively you can check this key:
HKEY_CURRENT_USER\Software\Classes\http\shell\open\ddeexec\Application

2) what you mean active?

3) handle... you mean handle of window? (or should I ask all open windows)

ziolko.
0
 

Author Comment

by:geocoins-software
ID: 22636414
>1.) and read "User Agent" value

what are the valid values?

>2) what you mean active?

Is the Default - webbowser open?  If not, is there a webbrowser opne?

>3) Handle of the webrowser window, so that I can enumerate the controls

thanks




0
 
LVL 21

Accepted Solution

by:
ziolko earned 2000 total points
ID: 22636657
1)
user agnet string is part of header of http requests it identifies web client making call, of course since it's just a string it can be anything. but if web browser was installed correctly it should indicate what browser is default. more about UA strings can be found here:
http://msdn.microsoft.com/en-us/library/ms537503.aspx

2) this can be difficult if possible at all, you can try number of different tricks like enumerating processes and look for iexplorer.exe or firefox.exe or ... you can also enumerate all top level windows read it's caption and check if it contains sub-string like "mozzila fire fox" or "microsoft internet explorer".
but anyone can write it's own app place TWebBrowser and then none of those tricks will work.

3) same as 2)

ziolko.
0
 

Author Comment

by:geocoins-software
ID: 22636744
Yeah, thats what I figured. Thanks!
0
 
LVL 21

Expert Comment

by:ziolko
ID: 22636758
3) not to mention web browser with multiple tabs there's no guarantee that those tabs are window controls and have handles at all.

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

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
Suggested Courses

604 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