Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Shellexecute - Please help
Message
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00429448
Message ID:
00429482
Views:
18
SET DEFA TO HOME() && Place the PDF you want to open in your home() directory.
=ShellExec(HOME()+ [ThePDFYouWantToLaunch.pdf])  && Replace ThePDFYouWantToLaunch.pdf with the PDF you want to open.

PROCEDURE ShellExec
LPARAMETERS tcFileName,tcWorkDir,tcOperation
LOCAL lcFileName,lcWorkDir,lcOperation

IF EMPTY(tcFileName)
	RETURN -1
ENDIF
lcFileName=ALLTRIM(tcFileName)
lcWorkDir=IIF(TYPE("tcWorkDir")="C",ALLTRIM(tcWorkDir),"")
lcOperation=IIF(TYPE("tcOperation")="C" AND NOT EMPTY(tcOperation),ALLTRIM(tcOperation),"Open")

DECLARE INTEGER ShellExecute ;
	IN SHELL32.DLL ;
	INTEGER nWinHandle,;
	STRING cOperation,;
	STRING cFileName,;
	STRING cParameters,;
	STRING cDirectory,;
	INTEGER nShowWindow
RETURN ShellExecute(0,lcOperation,lcFileName,"",lcWorkDir,1)
ENDPROC
Dave

>after reading the help files, I still dont get it,.
>can anyone post a sample of how to call the shell execute function.
>
>Thank you
>Bob Lee
Previous
Reply
Map
View

Click here to load this message in the networking platform