Articles   Members Online:
-Article/Tip Search
-News Group Search over 21 Million news group articles.
-Delphi/Pascal
-CBuilder/C++
-C#Builder/C#
-JBuilder/Java
-Kylix
Member Area
-Home
-Account Center
-Top 10 NEW!!
-Submit Article/Tip
-Forums Upgraded!!
-My Articles
-Edit Information
-Login/Logout
-Become a Member
-Why sign up!
-Newsletter
-Chat Online!
-Indexes NEW!!
Employment
-Build your resume
-Find a job
-Post a job
-Resume Search
Contacts
-Contacts
-Feedbacks
-Link to us
-Privacy/Disclaimer
Embarcadero
Visit Embarcadero
Embarcadero Community
JEDI
Links
Catching Browsers URLs with DDE Turn on/off line numbers in source code. Switch to Orginial background IDE or DSP color Comment or reply to this aritlce/tip for discussion. Bookmark this article to my favorite article(s). Print this article
24-Aug-02
Category
COM+
Language
Delphi 3.x
Views
148
User Rating
No Votes
# Votes
0
Replies
0
Publisher:
DSP, Administrator
Reference URL:
DKB
			Author: Tomas Rutkauskas

I try to catch all URLs that all instances of the web browser visit. I try to 
achieve this with DDE, but sometimes miss URLs.

Answer:

I did the same job not long ago. The code works alright with Netscape but with IE 
you will run into a problem.

If you start IE and then open additional windows with the 'New Window' menu item, 
then you are running only ONE instance and you will get successfully all URLs.

BUT:

If you start a second instance of IE by clicking on the icon in your start menu a 
second.. then only one of your two instances will report DDE messages to your 
Delphi program. Usually the first started one seems to reply.

There is no clean solution around it.

I ended up enumerating top level windows and manually checking each top level 
window whether it was an IE instance. Then I would move through the child window 
chain with FindWindow(), GetWindowClass() and so on.. and retrieve the URL that 
way. The same code actually worked for IE 4, IE 5.0 and IE 5.5. I did not test with 
IE 6.

The code needed a modification for Netscape, naturally.

			
Vote: How useful do you find this Article/Tip?
Bad Excellent
1 2 3 4 5 6 7 8 9 10

 

Advertisement
Share this page
Advertisement
Download from Google

Copyright © Mendozi Enterprises LLC