Solved

Get Web Address when using an ActiveX Plugin

Posted on 2003-11-27
2
537 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
  • 2
2 Comments
 
LVL 9

Accepted Solution

by:
mocarts earned 250 total points
Comment Utility
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
Comment Utility
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

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
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…
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…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.

743 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now