Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Opening internet explorer
Message
 
À
23/06/2005 06:43:20
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 6 SP5
OS:
Windows XP SP2
Network:
Windows XP
Database:
Visual FoxPro
Divers
Thread ID:
01025745
Message ID:
01025763
Vues:
13
>hi all,
>
>i have a URL that is stored in a textbox. i want that when the user double clicks on this textbox with the URL in it, internet explorer should open up and the requisite website displayed in the web browser.
>
>what is the code that will help me achieve this end result ?
>
>with sincere thanks to you.
   DECLARE INTEGER ShellExecute IN SHELL32.DLL INTEGER nWinHandle,;
                                               STRING cOperation,;
                                               STRING cFileName,;
                                               STRING cParameters,;
                                               STRING cDirectory,;
                                               INTEGER nShowWindow
    result = ShellExecute(0, 'Open', "http://www.levelextreme.com" , '', '', 1)
    DO CASE
       CASE result ==  0         && The system is out of memory or resources.
            msg = "The system is out of memory or resources."
       CASE result ==  2         && Bad Association (for example, invalid URL)
            msg = "invalid URL"
       CASE result == 29         && Failure to load application
            msg = "Fail to load application"
       CASE result == 30         && Application is busy 
            msg = "Application is busy"
       CASE result == 31         && No application association
            msg = "No application association"
   ENDCASE
   IF INLIST(result, 0, 2, 29, 30, 31)
      GetMessage(msg, 0 + 64, "Error")
   ENDIF
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform