Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations sizbut on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Ole!

Status
Not open for further replies.

johnod33

Programmer
Mar 17, 2003
34
US
I am using an ActiveX (OLE as us old f##ts know it) control on a form in VFP 6.0
The command line will execute this:
C:\WINDOWS\explorer.exe
but when W/Explorer opens I want it to go to a preset path.
Am I on the right track that I need to add something at the end of C:\WINDOWS\explorer.exe \\server\directory\subdirectory\ (see all my files in this subdirectory) ?

 
cDir = getdir()
IF LEN(cDir) > 0
RUN /N explorer /e, &cDir
*set default to (cDir)
ENDIF
 
Johnod,

Try this:

Code:
DECLARE INTEGER ShellExecute IN shell32.dll ;
  INTEGER hndWin, ;
  STRING cAction, ;
  STRING cFileName, ;
  STRING cParams, ;
  STRING cDir, ;
  INTEGER nShowWin

.....

ShellExecute(0, "explore", ;
  "SomeDirectoryPath", "", "", 1)

Mike





__________________________________
Mike Lewis (Edinburgh, Scotland)

My Visual FoxPro site: www.ml-consult.co.uk
 
Thanks baltman and Mike!
I appreciate your help.

John O'D
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top