Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How do I open a user's default browser and go to a website?
Message
De
12/07/2000 13:49:40
Randy Bowman
Al. Dept of Postsecondary Ed
Montgomery, Alabama, États-Unis
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Titre:
How do I open a user's default browser and go to a website?
Divers
Thread ID:
00391385
Message ID:
00391385
Vues:
48
I am developing a contacts application that will store web addresses. I would like to put a button on the form that when clicked, opens the users default browser and loads the web address.

While researching a solution to this problem, I came upon some code written in "Using Visual FoxPro 5" that says it will do exactly what I want. However, the notes in the book say it will only work with Win95 and NT 4.0 and we use both Win95 and WIn98. I thought that since the book was older, I would try the code anyway...

Needless to say, it didn't work. Since I don't understand why or how its supposed to work, I can't fix it. I was wondering if someone could point me in the right direction...

The code I have in my app looks like this:


lparameter tcUrl

tcUrl = iif(type("tcurl") = "C", tcurl, "http://acs.cc.al.us")

declare integer shellexecute;
in shell32.dll;
integer nWinHandle,;
string cOperation,;
string cfilename,;
string cparameters,;
string cdiretory,;
integer nshowwindow

declare integer FindWindow;
in win32api;
string cnull,;
string cWinName

return ShellExecute(FindWindow(0,_screen.caption),;
"Open", tcUrl,;
" ","c:\temp\",0)

The error message I am recieving is:
Cannot find entry point shellexecute in the DLL.

Thanks is advance for your help.
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform