F31203
asked on
WebBrowser - view source
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
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
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
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
It let's you control the HTML in your browser
ASKER
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
Pascal
Give me your E-Mail and i'll send it 2 u
If u have IE5 i think you can find this component in:
....\Common Files\Microsoft Shared\Triedit\DHTMLEd.OCX
....\Common Files\Microsoft Shared\Triedit\DHTMLEd.OCX
ASKER
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
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
Ok
Dotans@goldmail.net.il
Dotans@goldmail.net.il
did u try this ?
procedure TForm1.Button1Click(Sender : TObject);
var
FDoc: IHtmlDocument2;
begin
FDoc := WebBrowser1.Document As IHtmlDocument2;
ShowMessage(FDoc.body.oute rHTML);
end;
procedure TForm1.Button1Click(Sender
var
FDoc: IHtmlDocument2;
begin
FDoc := WebBrowser1.Document As IHtmlDocument2;
ShowMessage(FDoc.body.oute
end;
ASKER
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
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
you have to import the Mshtml.dll from the windows\system directory and then include the MSHTML_TLB
ASKER
Fine, it is running very well now !
Thanks for your help,
Pascal
Thanks for your help,
Pascal
ASKER
What is the declaration of FDoc and
IHtmlDocument2 ?
Regards,
Pascal