Autor Beitrag
eniac
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 75

Win 98, Win XP, SuSE Linux 9.0
D3 Prof
BeitragVerfasst: Mi 06.07.05 14:31 
servus,

ich weiß zwar, dass man mit der OLE-Komponente Word-Dateien anzeigen kann, aber wie macht man das zur Laufzeit?
Meine zweite Frage: Wie geht das mit pdf-Dateien? Es reicht mir auch wenn ich es so hinbekomme, dass der Acrobat Reader gestartet wird und die Datei darin geöffnet ist.

danke für jede Antwort...


Moderiert von user profile iconGausi: Topic aus VCL (Visual Component Library) verschoben am Mi 06.07.2005 um 17:05

_________________
Manche Leute haben den Horizont in Form eines Kreises mit Radius Null und das nennen sie dann einene Standpunkt.
jakobwenzel
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 1889
Erhaltene Danke: 1

XP home, ubuntu
BDS 2006 Prof
BeitragVerfasst: Mi 06.07.05 15:01 
Du öffnest den Adobe Reader (steht bestimmt in der Registry, wo der ist) mit der Datei als Parameter. Genauso musst du es mit Word machen.
Wenn die Datei Leerzeichen enthält solltest du sie in Anführungszeichen (" (Shift+2)) setzen.
eniac Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 75

Win 98, Win XP, SuSE Linux 9.0
D3 Prof
BeitragVerfasst: Mi 06.07.05 15:07 
danke, ich denke das müsste funktionieren.
Bei der Word-Datei müsste das dann aber so sein, dass der Text aus der Datei auf der Form (also in dem Ole-Container) angezeigt wird.

_________________
Manche Leute haben den Horizont in Form eines Kreises mit Radius Null und das nennen sie dann einene Standpunkt.
DaRkFiRe
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 526

WinXP Home & Professional
C, C++, Delphi
BeitragVerfasst: Do 07.07.05 04:36 
Warum so kompliziert? Take a look at "ShellExecute"

_________________
Lang ist der Weg durch Lehren - kurz und wirksam durch Beispiele! Seneca
Neidhard von Reuental
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 268

XP
BDS 2006 Prof
BeitragVerfasst: Do 07.07.05 04:45 
vom acrobatreader sollte auch ein aktivx installiert sein. binde es in delphi ein und dann kannst du es wie eiene normale komponente benutzen.
Lannes
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 2352
Erhaltene Danke: 4

Win XP, 95, 3.11, IE6
D3 Prof, D4 Standard, D2005 PE, TurboDelphi, Lazarus, D2010
BeitragVerfasst: Do 07.07.05 06:53 
Hallo,

Du könntest auch den TWebbrowser nutzen,
damit kannst Du dann *.doc und *.pdf (und weitere) anzeigen.
So:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
procedure LoadDocument(afile : String);
var Flags : OleVariant;
begin
  Flags := 0;
  while WebBrowser1.ReadyState < READYSTATE_INTERACTIVE do
    Application.ProcessMessages;
  WebBrowser1.Navigate(afile,Flags,Flags,Flags,Flags);
end;

_________________
MfG Lannes
(Nichts ist nicht Nichts) and ('' <> nil ) and (Pointer('') = nil ) and (@('') <> nil )
eniac Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 75

Win 98, Win XP, SuSE Linux 9.0
D3 Prof
BeitragVerfasst: Do 07.07.05 12:01 
danke an alle die Tipps gepostet haben!

Ich hab noch nicht alle sausprobiert aber damit müsste es klappen! :D

_________________
Manche Leute haben den Horizont in Form eines Kreises mit Radius Null und das nennen sie dann einene Standpunkt.