Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How do I find out the path to the default browser
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Divers
Thread ID:
00457167
Message ID:
00457189
Vues:
18
>Hi,
>I have the following problem:
>I would like to open a HTML page from my VFP application in the default Windows browser. I cannot use ShellExecute function, because I would like to search for a certain anchor (I'd like to open something like c:\html\mypage.htm#location).
>
>How do I find out a path do the default browser (e.g. c:\program files\netscape\communicator\program\netscape.exe or ..\..\iexprore.exe)?
>
>Thanks for help.
>
Martin,

Easiest is perhaps to use the registry to find what the default viewer for an htm file is. Simply retrieve the default value for HKEY_CLASSES_ROOT\.htm (which should be htmfile), the HKEY_CLASSES_ROOT\htmfile\Shell\Open\Command. The default value there contain the name of the browser program.
George

Ubi caritas et amor, deus ibi est
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform