Thank you Boris
>This Function Launch tha program associated to this file type. If no program associated raise an error. I don't know where You can associate some program to edit some file type. To Start PSP You must associate this file type with it. In PSP Goto "File->Prefferences->File Type Associations" and select the type You need. After that You must use "open" instead of edit run ShellExecute()
>
>
>
>
>
>>It works fine, but... where do you tell the program to launch just MsPaint ?
>>what sould I do to launch, for example Paint shop Pro ? Does It open the application associated to the File Type for Editing ?
>>
>>
>>>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
>>> msg = "The system is out of memory or resources."
>>> CASE result == 2
>>> msg = "Bad Association"
>>> CASE result == 29
>>> msg = "Failure to load application"
>>> CASE result == 30
>>> msg = "Application is busy"
>>> CASE result == 31
>>> 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 ! :-)