AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Thema durchsuchen
Ansicht
Themen-Optionen

PDF aus Delphi heraus öffnen

Ein Thema von Matze · begonnen am 26. Dez 2005 · letzter Beitrag vom 6. Jan 2006
Antwort Antwort
Seite 2 von 4     12 34      
PierreB
(Gast)

n/a Beiträge
 
#11

Re: PDF aus Delphi heraus öffnen

  Alt 26. Dez 2005, 21:39
Vielleicht nicht das was du suchst, wäre doch aber auch ne Möglichkeit: Guck dich nach guten Freeware-PDF-Komponenten um und lasse dein PDF dann direkt in deinem Programm anzeigen. Not macht erfinderisch.
  Mit Zitat antworten Zitat
Benutzerbild von Matze
Matze
(Co-Admin)

Registriert seit: 7. Jul 2003
Ort: Schwabenländle
14.929 Beiträge
 
Turbo Delphi für Win32
 
#12

Re: PDF aus Delphi heraus öffnen

  Alt 26. Dez 2005, 21:55
Hallo, nein ich möchte die PDF so öffnen, wie es der Anwender gewöhnt ist.
  Mit Zitat antworten Zitat
Benutzerbild von Luckie
Luckie

Registriert seit: 29. Mai 2002
37.621 Beiträge
 
Delphi 2006 Professional
 
#13

Re: PDF aus Delphi heraus öffnen

  Alt 26. Dez 2005, 22:08
Und was gibt nun ShellExecute zurück?
Michael
Ein Teil meines Codes würde euch verunsichern.
  Mit Zitat antworten Zitat
Benutzerbild von Matze
Matze
(Co-Admin)

Registriert seit: 7. Jul 2003
Ort: Schwabenländle
14.929 Beiträge
 
Turbo Delphi für Win32
 
#14

Re: PDF aus Delphi heraus öffnen

  Alt 26. Dez 2005, 22:16
Zitat von Luckie:
Und was gibt nun ShellExecute zurück?
Es gibt mir den Wert 31 zurück.

Nur sagt mir das nicht viel.
SysErrorMessage meldet mir zum Wert 31: Ein an das System angeschlossenes Gerät funktioniert nicht. Das muss wohl eine andere Funktion sein, mit der ich mit den Fehler in Textform anzeigen lassen kann.
  Mit Zitat antworten Zitat
Benutzerbild von Luckie
Luckie

Registriert seit: 29. Mai 2002
37.621 Beiträge
 
Delphi 2006 Professional
 
#15

Re: PDF aus Delphi heraus öffnen

  Alt 26. Dez 2005, 22:24
Das hat Christian doch schon geschrieben, dass das mit Shellexecute nicht geht:
Zitat:
Returns a value greater than 32 if successful, or an error value that is less than or equal to 32 otherwise. The following table lists the error values. The return value is cast as an HINSTANCE for backward compatibility with 16-bit Windows applications. It is not a true HINSTANCE, however. The only thing that can be done with the returned HINSTANCE is to cast it to an int and compare it with the value 32 or one of the error codes below.
Code:
0 The operating system is out of memory or resources.
ERROR_FILE_NOT_FOUND The specified file was not found.
ERROR_PATH_NOT_FOUND The specified path was not found.
ERROR_BAD_FORMAT The .exe file is invalid (non-Microsoft Win32 .exe or error in .exe image).
SE_ERR_ACCESSDENIED The operating system denied access to the specified file.
SE_ERR_ASSOCINCOMPLETE The file name association is incomplete or invalid.
SE_ERR_DDEBUSY The Dynamic Data Exchange (DDE) transaction could not be completed because other DDE transactions were being processed.
SE_ERR_DDEFAIL The DDE transaction failed.
SE_ERR_DDETIMEOUT The DDE transaction could not be completed because the request timed out.
SE_ERR_DLLNOTFOUND The specified dynamic-link library (DLL) was not found.
SE_ERR_FNF The specified file was not found.
SE_ERR_NOASSOC There is no application associated with the given file name extension. This error will also be returned if you attempt to print a file that is not printable.
SE_ERR_OOM There was not enough memory to complete the operation.
SE_ERR_PNF The specified path was not found.
SE_ERR_SHARE A sharing violation occurred.
Code:
/* regular WinExec() codes */
#define SE_ERR_FNF             2       // file not found
#define SE_ERR_PNF             3       // path not found
#define SE_ERR_ACCESSDENIED    5       // access denied
#define SE_ERR_OOM             8       // out of memory
#define SE_ERR_DLLNOTFOUND             32

#endif /* WINVER >= 0x0400 */

/* error values for ShellExecute() beyond the regular WinExec() codes */
#define SE_ERR_SHARE                   26
#define SE_ERR_ASSOCINCOMPLETE         27
#define SE_ERR_DDETIMEOUT              28
#define SE_ERR_DDEFAIL                 29
#define SE_ERR_DDEBUSY                 30
#define SE_ERR_NOASSOC                 31
Michael
Ein Teil meines Codes würde euch verunsichern.
  Mit Zitat antworten Zitat
Benutzerbild von Matze
Matze
(Co-Admin)

Registriert seit: 7. Jul 2003
Ort: Schwabenländle
14.929 Beiträge
 
Turbo Delphi für Win32
 
#16

Re: PDF aus Delphi heraus öffnen

  Alt 26. Dez 2005, 22:28
Äh und wieso wolltest du dann wissen, was es zurückgibt?
  Mit Zitat antworten Zitat
Benutzerbild von Luckie
Luckie

Registriert seit: 29. Mai 2002
37.621 Beiträge
 
Delphi 2006 Professional
 
#17

Re: PDF aus Delphi heraus öffnen

  Alt 26. Dez 2005, 22:47
Deswegen:
Zitat:
only thing that can be done with the returned HINSTANCE is to cast it to an int and compare it with the value 32 or one of the error codes below
Michael
Ein Teil meines Codes würde euch verunsichern.
  Mit Zitat antworten Zitat
Benutzerbild von Matze
Matze
(Co-Admin)

Registriert seit: 7. Jul 2003
Ort: Schwabenländle
14.929 Beiträge
 
Turbo Delphi für Win32
 
#18

Re: PDF aus Delphi heraus öffnen

  Alt 26. Dez 2005, 22:50
Code:
#define SE_ERR_NOASSOC                 31
Aber das haben wir ja zu Beginn schon herausgefunden.

Zitat:
Der angegebenen Datei ist keine Anwendung zugeordnet
Das dürfte damit ja gemeint sein.
  Mit Zitat antworten Zitat
Benutzerbild von mschaefer
mschaefer

Registriert seit: 4. Feb 2003
Ort: Hannover
2.029 Beiträge
 
Delphi XE3 Enterprise
 
#19

Re: PDF aus Delphi heraus öffnen

  Alt 26. Dez 2005, 23:18
Ahm, könnte es etwas mit den "" zutun haben? Was passiert, wenn Du die Hai-Routine bei Dir in den Quellcode einsetzt?
Grüße // Martin
Martin Schaefer
  Mit Zitat antworten Zitat
Benutzerbild von Matze
Matze
(Co-Admin)

Registriert seit: 7. Jul 2003
Ort: Schwabenländle
14.929 Beiträge
 
Turbo Delphi für Win32
 
#20

Re: PDF aus Delphi heraus öffnen

  Alt 26. Dez 2005, 23:24
Zitat von mschaefer:
Ahm, könnte es etwas mit den "" zutun haben? Was passiert, wenn Du die Hai-Routine bei Dir in den Quellcode einsetzt?
Die Hai Methode macht genau das, was mein Code auch macht - nichts. Die "" habe ich darum, da ShellExecute bei mir mal Probleme machte, wenn Leerzeichen in der Pfadangabe sind.
  Mit Zitat antworten Zitat
Antwort Antwort
Seite 2 von 4     12 34      


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 02:00 Uhr.
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz