Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Starting Webbrowser from VFP
Message
General information
Forum:
Visual FoxPro
Category:
Internet applications
Miscellaneous
Thread ID:
00037234
Message ID:
00037267
Views:
33
>Hi..
>
>Anyone know how to find the default Webbrowser, start it up and
>let it load an URL after ones choice from VFP ?
>
>TIA,
>
>Erik Niese-Petersen


* démarre le browser ou courrier par défaut et navigue vers l'URL placé dans MonURL

MonURL="http://www.total.net/~gersan/index.htm" && ou "mailto:gersan@total.net"

DECLARE INTEGER ShellExecute ;
IN SHELL32.dll ;
INTEGER nWinHandle, ;
STRING cOperation, ;
STRING cFileName, ;
STRING cParameters, ;
STRING cDirectory, ;
INTEGER nShowWindow

**retrouve le handle de la fenêtre principale de foxpro

DECLARE INTEGER FindWindow ;
IN WIN32API ;
STRING cNull, ;
STRING cWinName

z=ShellExecute(FindWindow( 0, _SCREEN.caption), "Open", MonURL, "", "c:\temp\", 1)

**Si la valeur de retour est inférieure à 32, messages d'erreurs

IF z < 32
DO CASE
CASE z=2
Wait wind "Mauvaise association/ou URL invalide, oops!"
CASE z=31
Wait wind "Pas d'association (browser), oops!"
CASE z=29
Wait wind "L'application ne peut démarrer, oops!"
CASE z=30
Wait wind "L'application (browser) fonctionne déjà, oops!"
ENDCASE
ENDIF


;)
If we exchange an apple, we both get an apple.
But if we exchange an idea, we both get 2 ideas, cool...


Gérald Santerre
Independant programmer - internet or intranet stuff - always looking for contracts big or small :)
http://www.siteintranet.qc.ca
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform