Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Launching an external program
Message
 
À
02/11/2004 05:31:33
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Database:
Visual FoxPro
Divers
Thread ID:
00956900
Message ID:
00956906
Vues:
8
This message has been marked as the solution to the initial question of the thread.
Use ShellExecute
   DECLARE INTEGER ShellExecute IN SHELL32.DLL INTEGER nWinHandle,;
                                               STRING cOperation,;
                                               STRING cFileName,;
                                               STRING cParameters,;
                                               STRING cDirectory,;
                                               INTEGER nShowWindow
    result = ShellExecute(0, 'Edit', YourPictureFieldHere , '', '', 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 = "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 application association
            msg = "No application association"
   ENDCASE
   IF INLIST(result, 0, 2, 29, 30, 31)
      MessageBox(msg, 0 + 64)
   ENDIF
>In a Form I show an image using the Image control.
>I'd like to open it with MsPaint (but it could be aother graphical program) to edit and modify it. I tried uing "wshell.script", but what was opened was
>the Picture Viewer. How can I open MsPaint with the file I want to edit ?
>Thank you
>Alessio
>
>PS
>Don't make any comment about my English, I can see it myself ! :-)
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