I already know in a limited way how to use ShellExecute and the API call to Shell32.dll to open another program. Since I have dozens of VFP programs compiled as separate EXEs, the desktops are getting cluttered. Besides, I need to manage all the user rights so the users never even sees programs he doesn't have rights to open. It would be great to manage that with a central core VFP application that acts as a huge menu for the users and the users would only see the programs they have rights to based on one user-access table used in the app. That way it would be simple to manage from a central database. My questions are:
1. Can I have my VFP project make multiple calls to multiple programs on the "menu" or selection list? Can I have several open at once, not just one at a time?
2. Can my original menu program be closed and the called programs keep working? (I know the call to the API is designed so that when the called program terminates, it returns a value to the caller program with the results as a numeric value.)
I looked over some other posts such as thread184-787490 and seen informative links such as
As a side point, what confuses me too is I looked in the VFP 9.0 help and it described a ShellExecute foundation class that only allowed 3 parameters. Is this something totally unrelated to the ShellExecute I've been using above?
Found in VFP 9.0 Help:
Syntax: ShellExecute(tcFileName, tcWorkDir, tcOperation)
Return: nSuccess
Thanks for your help, as always,
dbMark
1. Can I have my VFP project make multiple calls to multiple programs on the "menu" or selection list? Can I have several open at once, not just one at a time?
2. Can my original menu program be closed and the called programs keep working? (I know the call to the API is designed so that when the called program terminates, it returns a value to the caller program with the results as a numeric value.)
I looked over some other posts such as thread184-787490 and seen informative links such as
Code:
DECLARE INTEGER ShellExecute IN Shell32.DLL ;
INTEGER nWinHandle,;
STRING cOperation,;
STRING cFileName,;
STRING cParameters,;
STRING cDirectory,;
INTEGER nShowWindow
nResults = ShellExecute(0,"open","VFP_APP.EXE","'"+cInvoiceNo+"' '"+cData+"'","C:\MyApps",1)
As a side point, what confuses me too is I looked in the VFP 9.0 help and it described a ShellExecute foundation class that only allowed 3 parameters. Is this something totally unrelated to the ShellExecute I've been using above?
Found in VFP 9.0 Help:
Syntax: ShellExecute(tcFileName, tcWorkDir, tcOperation)
Return: nSuccess
Thanks for your help, as always,
dbMark