Solved

Get Web Address when using an ActiveX Plugin

Posted on 2003-11-27
2
549 Views
Last Modified: 2013-11-18
I have create a ActiveX Plugin for Internet Explorer, that will display Tiff files.

What I need is to extract the web address (e.g. "www.testsite.co.uk/testapps/") from Internet Explorer.

The idea is as follows:
A user browses my site and clicks on a link that will display a tiff image, as the ActiveX is loading up, the ActiveX extract the web address of the current HTML page.

Can anyone help please.
0
Comment
Question by:StayGreedy
[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
  • 2
2 Comments
 
LVL 9

Accepted Solution

by:
mocarts earned 250 total points
ID: 9832521
Hi
I did a little research and successfull test with ActiveForm embeded in html:

uses mshtml...;
...
procedure TActiveFormX.Button1Click(Sender: TObject);
var
  id: IHTMLDocument2;
  ic: IOleContainer;
  iow: IOleWindow;
begin
  if (ActiveFormControl.ClientSite.GetContainer(ic) = S_OK) and
     (ic.QueryInterface(IOleWindow, iow) = S_OK) and
      (iow.QueryInterface(IHTMLDocument2, id) = S_OK) then
        edit1.Text := id.Get_url
end;

wbr, mo.
0
 
LVL 9

Expert Comment

by:mocarts
ID: 9834191
also look at this PAQ http://www.experts-exchange.com/Programming/Programming_Languages/Delphi/Q_20578481.html
you can use PARAM parameter to retrieve URL - just write your OBJECT tag by using JavaScript dynamically on client side and write your url parameter as current url (Document.location or smth)

wbr, mo.
0

Featured Post

Independent Software Vendors: 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

Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
The purpose of this video is to demonstrate how to set up the WordPress backend so that each page automatically generates a Mailchimp signup form in the sidebar. This will be demonstrated using a Windows 8 PC. Tools Used are Photoshop, Awesome…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…

738 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