**Shell API for Viewing **ShellAPIViewing.prg ** The only problem is that when a file is not ASSOCIATED there is no warning or message available ** Shellexecute returns integers which I don't know what the values represent. LPARAMETERS lcLink, lcAction, lcParms ** definitions for nShowWindow variable #define SW_HIDE 0 #define SW_SHOWNORMAL 1 #define SW_NORMAL 1 #define SW_SHOWMINIMIZED 2 #define SW_SHOWMAXIMIZED 3 #define SW_MAXIMIZE 3 #define SW_SHOWNOACTIVATE 4 #define SW_SHOW 5 #define SW_MINIMIZE 6 #define SW_SHOWMINNOACTIVE 7 #define SW_SHOWNA 8 #define SW_RESTORE 9 #define SW_SHOWDEFAULT 10 #define SW_FORCEMINIMIZE 11 #define SW_MAX 11 lcAction=IIF(empty(lcAction),"Open", lcAction) lcParms=IIF(empty(lcParms),"",lcParms) *!* kve 1/30/01 nshowWindow was Integer DECLARE integer ShellExecute ; in shell32.dll ; integer nWinHandle , ; string cOperation, ; string cFileName, ; string cParameters, ; string cDirectory, ; integer nShowWindow DECLARE Integer FindWindow ; in win32api ; string cNull , ; string cWinName IF empty(lcLink) lcLink=getfile() ENDIF IF not empty(lcLink) *!* kve 1/30/01: switched nShowWindow from 1 to 0 to see what happens lcResult= ShellExecute(FindWindow(0,_screen.caption), ; lcAction, lcLink, lcParms, sys(2023), 3) wait window timeout 2 "Opening File "+alltrim(lcLink)+". The file will display if it associated with an application." ENDIF