Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Default Browser
Message
De
10/08/2001 13:29:38
 
 
À
10/08/2001 12:20:43
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Titre:
Divers
Thread ID:
00542144
Message ID:
00542404
Vues:
20
I missed the pre-history of this thread and therefore don't know if I'm reposting a tip. Anyway, there is a VFP foundation class that you can use to address this issue with minimum fuss.

From the Component Gallery / Foundation Classes / Utilities insert the "Registry Access" class library into your project and
SET CLASSLIB TO "registry" ADDITIVE
...
loApplication = CREATEOBJECT("registry.filereg")

IF TYPE("loApplication")="O" AND loApplication.GetAppPath("HTM",@lcFileDescription,@lcBrowser,.F.)=0
  IF LEFT(lcBrowser,1)='"'
    lcBrowser = LEFT(lcBrowser,AT('"',lcBrowser,2))
    lcBrowser = SUBSTR(lcBrowser,2,LEN(lcBrowser)-2)
  ENDIF
ENDIF
lcBrowser holds the path to the default executable

>I think the sample code from Cetin is my best option so far as it returns the executable file associated with a file extention. So I can pass it "HTM" and it will return the default executable to open htm files.

bye
----------------------------------
António Tavares Lopes
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform