Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
ReaderWrapper to control Adobe Reader - Use in VFP?
Message
De
13/12/2004 09:47:25
 
 
À
13/12/2004 09:04:18
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP
Network:
Windows XP
Database:
Visual FoxPro
Divers
Thread ID:
00968303
Message ID:
00968729
Vues:
11
>Thanks for looking at it Herman. I appreciate it. I am testing it and playing around with it now. I had to play with the sleep times a bit to prevent it trying to connect too soon and still the settings do not seem to be consistent. I wonder if there is a way to postpone processing without using sleep or how to determine the required time to wait. Now everything pretty much works except I continously get a c5 error when it tries to close Adobe.
>

You can use "CreateProcess(...)", then "WaitForInputIdle( hProcess, 5000 )". It will wait for 5 seconds or the process has been ready. For the error, I think it's because of the parameters ( I got error too because of that :) ). Now, I'm not too familiar with Adobe and I don't have the SDK. Maybe you can search there what does it do exactly. I'm afraid that it disconnected the DDE too (well, maybe ?).


>Also, I thought the print method would launch the print dialog but it does not. I'll have to research and see if that is possible. My intention was to silently print but to display the print dialog without displaying Adobe at all as this does (exept that it does not display the print dialog):
>

No, you can't bring up the print dialog without showing the Parent Window of the dialog(Adobe). One way is to monitor Adobe window, then when it display move it to the invisible area (ie.: top = -1000)


>
>lcfile = "c:\tracy\p1.pdf"
>DECLARE INTEGER ShellExecute IN "Shell32.dll" ;
>    INTEGER hwnd, ;
>    STRING lpVerb, ;
>    STRING lpFile, ;
>    STRING lpParameters, ;
>    STRING lpDirectory, ;
>    LONG nShowCmd
>
>llok= ShellExecute(0, "open", "acrord32.exe", " /p /h "+lcfile, "", 0)
>return llok
>
>
>Tracy

Regards
Herman
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform