Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How do I
Message
De
09/06/1999 22:01:39
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Titre:
Divers
Thread ID:
00228150
Message ID:
00228235
Vues:
12
>Get the default browser for the machine?
>
>
>Wayne

You could check in the registry to see the Shell/Open command registered for htm files. This will be a two step process as different browsers register htm files as different file types. You'l have to look in HKEY_CLASSES_ROOT/.htm. After getting the value, check further down in HKEY_CLASSES_ROOT for that type (for example, htm files on my machine or of type htmlfile.

I then have to check HKEY_CLASSES_ROOT/htmlfile/Shell/Open/Command to see the path to the program used to view html.

There is probably an API call to get the default application for a file type, but I don't know it. George? Ed?

OTOH, if all you want to do is use the default browser to open a specified file, you can use:

oShell = CREATEOBJECT("Shell.Application")
oShell.Open("c:\mywebpage.htm")

OR

oShell.Open("http://www.levelextreme.com")
Erik Moore
Clientelligence
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform