Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Program Install
Message
De
12/01/2003 01:08:28
 
 
À
12/01/2003 00:11:27
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Titre:
Divers
Thread ID:
00740742
Message ID:
00740745
Vues:
18
>Hi All,
>
>Is there a way to find out if the user have an acrobat writer/reader install on their computer before enabling one of the options on the form? TIA

Hi Mathew

Check out the Windows API FindExecutable() function here on the UT or at http://www.news2news.com. It returns the associated app for a given file. Also check the ShellExecute() function.

I found the following here on the UT but cannot remember who wrote it so cannot credit the right person. Sorry.
DECLARE INTEGER FindExecutable IN shell32; 
    STRING   lpFile,; 
    STRING   lpDirectory,; 
    STRING @ lpResult 

DECLARE INTEGER GetLastError IN kernel32 

lcResult = SPACE(250) 

IF FindExecutable ("c:\temp\MyTest.pdf", "", @lcResult) > 32 
    ? Left (lcResult, AT(Chr(0), lcResult)-1) 
ELSE 
    *   2 = Cannot find the file specified 
    *   3 = Cannot find the path specified 
    *  21 = The device is not ready 
    * 127 = The specified procedure could not be found 
    ? "Error code:", GetLastError() 
ENDIF  
In the End, we will remember not the words of our enemies, but the silence of our friends - Martin Luther King, Jr.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform