Solved

WebBrowser - view source

Posted on 2000-02-24
12
520 Views
Last Modified: 2010-04-04
I would like to extract the WebBrowser
content in a memo (as it does when right click on the HTML page - view source).

(P.S. : I cannot use HTTP.get('URL') because of problems with proxy authentication)

Help would be appreciated,

Regards,

Pascal
0
Comment
Question by:F31203
[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
  • 7
  • 5
12 Comments
 

Accepted Solution

by:
dotan earned 50 total points
ID: 2554151
FDoc := FWebBrowser.Document As IHtmlDocument2;
ShowMessage(FDoc.body.outerHTML)
0
 

Author Comment

by:F31203
ID: 2554278
Dear Dotan,

What is the declaration of FDoc and
IHtmlDocument2 ?

Regards,

Pascal
0
 

Expert Comment

by:dotan
ID: 2554638
If you import the "DHTML edit control" from the ActiveX wizard you shold be able to use it.
It let's you control the HTML in your browser
0
Technology Partners: 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!

 

Author Comment

by:F31203
ID: 2554749
I am actually running Delphi 5 C/S : if I select Component, Import ActiveX Control..., I have no "DHTML edit control".  It seems to be a .dll or an .ocx file ???

Pascal
0
 

Expert Comment

by:dotan
ID: 2555113
Give me your E-Mail and i'll send it 2 u
0
 

Expert Comment

by:dotan
ID: 2555151
If u have IE5 i think you can find this component in:
....\Common Files\Microsoft Shared\Triedit\DHTMLEd.OCX
0
 

Author Comment

by:F31203
ID: 2557390
Dotan,

OK, I have installed IE5 and registered the DHTML ... ActiveX component.

May I send you my example, because I don't see where I can define the FDoc ???

Pascal
0
 

Expert Comment

by:dotan
ID: 2562223
Ok
Dotans@goldmail.net.il
0
 

Expert Comment

by:dotan
ID: 2564662
did u try this ?

procedure TForm1.Button1Click(Sender: TObject);
var
  FDoc: IHtmlDocument2;
begin
FDoc := WebBrowser1.Document As IHtmlDocument2;
ShowMessage(FDoc.body.outerHTML);
end;
0
 

Author Comment

by:F31203
ID: 2564693
Yes, but it stops at the declaration
var FDoc:IHtmlDocument2; (undeclared identifier).

Here is my uses parameters :

uses
  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  StdCtrls, OleCtrls, SHDocVw, ExtCtrls, DHTMLEDLib_TLB, OleServer, Word97;

Pascal
0
 

Expert Comment

by:dotan
ID: 2564791
you have to import the Mshtml.dll from the windows\system directory and then include the MSHTML_TLB
0
 

Author Comment

by:F31203
ID: 2564915
Fine, it is running very well now !
Thanks for your help,

Pascal
0

Featured Post

Industry Leaders: 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

Suggested Solutions

In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
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 Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

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