Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Launching an external program
Message
From
02/11/2004 05:54:47
 
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
00956900
Message ID:
00956907
Views:
7
Thank you Borislav

>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 ! :-)
Previous
Reply
Map
View

Click here to load this message in the networking platform