Solved

Get Web Address when using an ActiveX Plugin

Posted on 2003-11-27
2
550 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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

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…
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…
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…
There's a multitude of different network monitoring solutions out there, and you're probably wondering what makes NetCrunch so special. It's completely agentless, but does let you create an agent, if you desire. It offers powerful scalability …

717 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