Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

WebBrowser - view source

Posted on 2000-02-24
12
Medium Priority
?
526 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 200 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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 

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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

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…
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…
Suggested Courses

705 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