?
Solved

Get Web Address when using an ActiveX Plugin

Posted on 2003-11-27
2
Medium Priority
?
552 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 1000 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

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
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…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
Suggested Courses
Course of the Month10 days, 18 hours left to enroll

770 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