Here's the code from _shellexecute modified and tersely explained:
[tt]
CLEAR
* Open the document with mspaint
ShellExecuteVFP("MsPaint","1000.jpg","C:\Documents and Settings\default user\My Documents\My Pictures\","open"
* Open the document with its default application
ShellExecuteVFP("C:\Documents and Settings\default user\My Documents\My Pictures\1000.jpg",,,)
* Open windows explorer
ShellExecuteVFP("c:\\Program Files",,,"open"
* Open the windows search dialog
ShellExecuteVFP("c:\\Program Files",,,"find"
CLEAR DLLS
FUNCTION ShellExecuteVFP(lcFileName, lcParams, lcWorkDir, lcOperation)
* WinApi :: ShellExecute
** Function: Opens a file in the application that it's
** associated with.
** Pass: lcFileName - Name of the file to open or an executable
** lcParams - If lcFileName is an executable, lcParams
** is/are the parameters to the executable
** lcWorkDir - The default directory to use
** lcOperation - The operation/verb to perform on lcFileName
** edit - Launches an editor and opens the document for editing.
** find - Initiates a search starting from the specified directory.
** open - Launches an application. If this file is not an executable file,
** its associated application is launched.
** print - Prints the document file.
** properties - !Displays the file or folder's properties!
** Included here for completeness, you won't be able to
** use this verb in VFP
**
** Return: 2 - Bad Association (e.g., invalid URL)
** 31 - No application association
** 29 - Failure to load application
** 30 - Application is busy
**
** Values over 32 indicate success
** and return an instance handle for
** the application started
LOCAL lcWorkDir,lcOperation
IF EMPTY(lcFileName)
RETURN -1
ENDIF
lcFileName=ALLTRIM(lcFileName)
lcParams = IIF(TYPE("lcParams"

=="C",ALLT(lcParams)+CHR(0),""
lcWorkDir=IIF(TYPE("lcWorkDir"

="C",ALLTRIM(lcWorkDir)+CHR(0),""
lcOperation=IIF(TYPE("lcOperation"

="C" .AND. ;
!EMPTY(lcOperation),ALLTRIM(lcOperation),"Open"
*-* HINSTANCE ShellExecute(hwnd, lpszOp, lpszFile, lpszParams, lpszDir, wShowCmd)
*-*
*-* HWND hwnd - handle of parent window
*-* LPCTSTR lpszOp - address of string for operation to perform
*-* LPCTSTR lpszFile - address of string for filename
*-* LPTSTR lpszParams - address of string for executable-file parameters
*-* LPCTSTR lpszDir - address of string for default directory
*-* INT wShowCmd - whether file is shown when opened
DECLARE INTEGER ShellExecute ;
IN SHELL32.DLL ;
INTEGER nWinHandle,;
STRING cOperation,;
STRING cFileName,;
STRING cParameters,;
STRING cDirectory,;
INTEGER nShowWindow
RETURN ShellExecute(0,lcOperation,lcFilename,lcParams,lcWorkDir,1)
ENDFUNC
[/tt]
'We all must do the hard bits so when we get bit we know where to bite'
