Here is a quickie to use ShellExecute to open Windows Explorer to a
Specified Directory:
{Just Copy and Paste into an RMD file of your choice}

{Begin RBase Code}

SET VAR nshowcmd INTEGER = 1  {SW_SHOWNORMAL (1) }
SET VAR lpdirectory TEXT = NULL

{In the lpParameters, set the third value to the Folder to Display}
SET VAR lpparameters TEXT = '/n, /root, f:\'
{ SystemRoot = c:\Windows }
SET VAR lpfile TEXT = ((ENVVAL('SystemRoot')) + '\explorer.exe')
SET VAR lpoperation TEXT = NULL
{ If you want you can pass Handle of RBASE Form Here otherwise 0}
SET VAR hwnd INTEGER = 0

SET VAR vRetval INTEGER = NULL

IF (Chkfunc('ShellExecuteA')) = 0 THEN
  STDCALL Function 'ShellExecuteA' alias 'ShellExecute' +
  (INTEGER, PTR TEXT (256), PTR TEXT (128), +
  PTR TEXT (128), PTR TEXT (32), INTEGER) : INTEGER
ENDIF

SET VAR vRetval = (DLCALL('shell32.dll', 'ShellExecuteA', +
nshowcmd, lpdirectory, lpparameters, lpfile, lpoperation, hwnd))

RETURN

{End RBase Code}



> -----Original Message-----
> From: [email protected] [mailto:[email protected]] On Behalf Of MikeB
> Sent: Wednesday, December 04, 2013 4:45 PM
> To: RBASE-L Mailing List
> Subject: [RBASE-L] - RE: Anti-Launch
> 
> I just got back. I will put up a sample to open up and close Notepad to
> give you some place to start.
> 
> 
> 
> 
> > -----Original Message-----
> > From: [email protected] [mailto:[email protected]] On Behalf Of
> > Richardson, Jeff
> > Sent: Wednesday, December 04, 2013 2:28 PM
> > To: RBASE-L Mailing List
> > Subject: [RBASE-L] - RE: Anti-Launch
> >
> > Thank you for the suggestions. I never played around the DLCALL
> > command (and the associated commands) before. Looking at RBase Help,
> > it looks like a lot to digest right now. I look for the giving this a
> > try when I have a little more time.
> >
> >
> > -----Original Message-----
> > From: [email protected] [mailto:[email protected]] On Behalf Of MikeB
> > Sent: Wednesday, December 4, 2013 12:03 PM
> > To: RBASE-L Mailing List
> > Subject: [RBASE-L] - RE: Anti-Launch
> >
> > Also, harsh, but less harsh than DestroyWindow, is the
> > TerminateProcess function.
> >
> >
> >
> > > -----Original Message-----
> > > From: [email protected] [mailto:[email protected]] On Behalf Of
> > > Richardson, Jeff
> > > Sent: Wednesday, December 04, 2013 10:30 AM
> > > To: RBASE-L Mailing List
> > > Subject: [RBASE-L] - Anti-Launch
> > >
> > > Hello. I know I can launch a program/file using the LAUNCH command.
> > Is
> > > there an RBase command that will then force the launched
> > > program/file to close?  I'm using the latest 9.5 (64) . Thank you!


Reply via email to