Autor Beitrag
tmkb
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 59



BeitragVerfasst: Fr 15.11.02 14:30 
Hallo,

Ich habe eine Webbrowserkomponente und ich will dass per Button-Klick der Quelltext der Seite, welche gerade in der Webbrowser-Kompo geladen ist, in ein Memo-Feld geschrieben wird. Ist das irgendwie möglich?
mfg!
tmkb
hannes
Hält's aus hier
Beiträge: 1



BeitragVerfasst: Fr 15.11.02 19:46 
Titel: genau die gleiche frage hab ich auch
man müsste eine seite geladen haben und von dieser seite den Quelltext in ein Memo lesen!! Das würde mich ma interssieren.
DaFox
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 189



BeitragVerfasst: Sa 16.11.02 02:08 
Hi!

ausblenden Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
{ uses SHDocVw_TLB, MSHTML_TLB }

var
  aHTMLDoc   : IHTMLDocument2;
  aHTMLBody  : IHTMLElement;
  swHTMLText : WideString;
begin
  if not VarIsEmpty(WebBrowser1.Document) then
    begin
      aHTMLDoc := WebBrowser1.Document as IHTMlDocument2;
      aHTMLBody := aHTMLDoc.Get_body;
      swHTMLText := aHTMLBody.outerHTML;
      Memo1.Text := swHTMLText;
    end;


Gruß,
Markus
matze
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 4613
Erhaltene Danke: 24

XP home, prof
Delphi 2009 Prof,
BeitragVerfasst: Sa 16.11.02 08:54 

_________________
In the beginning was the word.
And the word was content-type: text/plain.
Spike
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 69
Erhaltene Danke: 1



BeitragVerfasst: So 01.12.02 10:38 
gibt es auch eine Möglichkeit an den im Webbrowser markierten Text ranzukommen?