Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Windows Open With dialog
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Versions des environnements
Visual FoxPro:
VFP 7 SP1
Divers
Thread ID:
00978449
Message ID:
00978468
Vues:
43
This message has been marked as the solution to the initial question of the thread.
Try with ShellExecute
DECLARE INTEGER ShellExecute IN SHELL32.DLL INTEGER nWinHandle,;
                                            STRING cOperation,;
                                            STRING cFileName,;
                                            STRING cParameters,;
                                            STRING cDirectory,;
                                            INTEGER nShowWindow
result = ShellExecute(0, 'Open', "YourFileName.Ext" , '', '', 1)
IF result == 31
   result = ShellExecute(0, 'Open', 'rundll32.exe','shell32.dll,OpenAs_RunDLL' + ' FullPathToYourFile.Ext', '', 1);
ENDIF

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 = "Bad Association"
   CASE result == 29	     && Failure to load application
        msg = "Failure to load application"
   CASE result == 30	     && Application is busy 
        msg = "Application is busy "
   CASE result == 31	     && No association
        msg = "No association "
ENDCASE
IF INLIST(result, 0, 2, 29, 30)
   GetMessage(msg, 0 + 64, "Warning")
ENDIF
Not tested
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
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform