You might consider shipping in your main application, and a second
diagnostic application with a menu option to launch explorer in the desired
path. I hide the launch menu option as a right click of the about form.

Launching the explorer window the way it's done below, will start it as a
child of the main thread, instead of a child of your application. It starts
faster this way too.

[code]   
#DEFINE CSIDL_APPDATA 0x001a   
#DEFINE CSIDL_COMMON_APPDATA 0x0023   
#DEFINE CSIDL_LOCAL_APPDATA 0x001c   
#DEFINE CSIDL_PERSONAL 0x0005   
#DEFINE CSIDL_MYPICTURES 0x0027   

DECLARE INTEGER SHGetFolderPath IN SHFolder.dll AS SHGetFolderPath;   
   INTEGER hwndOwner, ;
   INTEGER nFolder, ;
   INTEGER hToken, ;
   INTEGER dwFlags, ;
   STRING@ pszPath

DECLARE INTEGER ShellExecute IN Shell32.dll AS ShellExecute;   
   INTEGER nWinHandle, ;
   STRING  cOperation, ;
   STRING  cFileName,  ;
   STRING  cParameters, ;
   STRING  cDirectory,  ;
   INTEGER nShowWindow


cPath = GetAppDataLocation()   
cCmd = cPath   
cParams = ""   

ShellExecute(0, "open", cCmd, cParams, cPath, 1)

PROCEDURE GetPicturesLocation   
   Local cPath, nrtn, nhwnd, ntkn, nflags
   STORE 0 TO nrtn, nhwnd, ntkn, nflags
   cPath = REPLICATE(CHR(0),254)
   nrtn = SHGetFolderPath(nhwnd, CSIDL_MYPICTURES, ntkn, nflags, @cPath)
   cPath = ALLTRIM(cPath, CHR(0))
   RETURN cPath
ENDPROC   

PROCEDURE GetDocumentsLocation   
   Local cPath, nrtn, nhwnd, ntkn, nflags
   STORE 0 TO nrtn, nhwnd, ntkn, nflags
   cPath = REPLICATE(CHR(0),254)
   nrtn = SHGetFolderPath(nhwnd, CSIDL_PERSONAL, ntkn, nflags, @cPath) 
   cPath = ALLTRIM(cPath, CHR(0))
   RETURN cPath
ENDPROC   

PROCEDURE GetAppDataLocation   
   Local cPath, nrtn, nhwnd, ntkn, nflags
   STORE 0 TO nrtn, nhwnd, ntkn, nflags
   cPath = REPLICATE(CHR(0),254)
   nrtn = SHGetFolderPath(nhwnd, CSIDL_COMMON_APPDATA, ntkn, nflags, @cPath)
   cPath = ALLTRIM(cPath, CHR(0))
   RETURN cPath
ENDPROC   
[/code]

-----Original Message-----
From: MB Software Solutions, LLC
Sent: Wednesday, August 26, 2009 11:15 PM

I've got a VFP9SP1 app that's storing data by default in the AppData folder
(C:\DOCUMENTS AND SETTINGS\MBABCOCK\APPLICATION DATA\EMAILEXTRACT2009\).

However, this folder isn't visible to the user, so it's not easy for them to
retrieve files created there.

I'm thinking I'll use a different folder, but I just wondered why this isn't
visible to the end-user?  Perhaps this folder is meant for 
internal-use data and not for the user to go meddling????   ;-)



_______________________________________________
Post Messages to: ProFox@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: 
http://leafe.com/archives/byMID/profox/000701ca271c$19d864e0$4d892e...@com
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to