>Hello,
>
>I was looking for a "ShellExecute" windows api from FoxPro2.6 (16 bit version). Is it possible to run a file from FoxPro 2.6 using the default program (like when a ".DOC" file automatically opens in Word.)
>
>I remember that this was not possible in Windows 3.1. Does anybody know about this?
>Thanks for your help in advance!
Sure you could do it in Win 3.x. Here's some code (note that Foxtools must be loaded first).
m.shell = RegFN('ShellExecute', "I@C@C@C@CI", 'I', "Shell.Dll")
lcpath = JustPath(lcfile)
lcop = "Open"
lcparms = ""
m.result = CallFN(m.shell, 0, @lcop, @lcfile, @lcparms, @lcpath, 2)
George
Ubi caritas et amor, deus ibi est