Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Paint Brush
Message
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Miscellaneous
Thread ID:
00153835
Message ID:
00153949
Views:
21
Hi George!

You could also open a specific file using the run command, by passing it as a parameter. For example:

RUN /N C:\PROGRAM FILES\ACCESSORIES\MSPAINT.EXE C:\Windows\forest.bmp

Nabil: MSPAINT does not work with OLE Automation.


>If you want to open paint brush without opening a file (and you know the complete path), use RUN.
>
>Otherwise, you can use ShellExecute, passing the name of the file you want opened, like this:
>DECLARE INTEGER ShellExecute IN Shell32;
>  INTEGER hwnd, STRING @lpOperation, STRING @lpFile,;
>  STRING @lpParameters, STRING @lpDirectory, SHORT nshow
>* lcfile is the bitmap to open, lcdir is the working directory.
>* lnshow is the show command
>lcop = 'open'
>lnresult = ShellExecute(0, @lcop, @lcfile, 0, @lcdir, lnshow)
>See help for RUN for the lnshow values. The return value will be greater than 31 if the function succeeds.
>
>hth,
kenweber
GCom2 Solutions
Microsoft Certified Professional

Previous
Next
Reply
Map
View

Click here to load this message in the networking platform