Autor Beitrag
vsti
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 43

XP Home
D2005
BeitragVerfasst: Do 10.02.05 10:57 
Moinsen,

ich hab ein Programm welches Emails ausliest sie ein eine Tabelle speichert und den Html-Inhalt anzeigen kann, dafür kopiere ich bis jetzt die Dateien tempörär auf die Festplatte und öffne die Datei mit

ausblenden Delphi-Quelltext
1:
WebBrowser1.Navigate('file:///'+htmlfile);					


Jetzt denke ich mir, es ist doch eleganter die Datei aus dem Arbeitsspeicher zu lesen, z.B aus einem Stream.
So Speicher ich den Html-Inhalt aus einer Tabelle in den Stream:

ausblenden Delphi-Quelltext
1:
(SqlQuery1.FieldByName('HtmlInhalt') as TBlobField).SaveToStream(HtmlStream);					


Gibt es eine Möglichkeit den Stream als Datei zu "simulieren", so dass ich z.B.

ausblenden Delphi-Quelltext
1:
WebBrowser1.Navigate('file:///'+HtmlStream);					

:autsch:

angeben kann? :gruebel:

greez, vsti

_________________
[size=10:8b472be373]Wer anderen eine Grube gräbt hat Gold im Mund.[/size:8b472be373]
retnyg
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 2754

SNES, GB, GBA, CPC, A500, 486/66, P4/3.0HT: NintendOS, AmigaOS, DoS
Delphi 5, Delphi 7
BeitragVerfasst: Do 10.02.05 14:33 
eine möglichkeit wäre die datei direct in das seiten-objekt des browsers zu laden.

übrigens würde ein file:// mit 2 slashes auch reichen.
matze
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 4613
Erhaltene Danke: 24

XP home, prof
Delphi 2009 Prof,
BeitragVerfasst: Fr 11.02.05 10:39 

_________________
In the beginning was the word.
And the word was content-type: text/plain.