Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Any VFP 7 like version of GETDIR() for VFP 6?
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00724840
Message ID:
00725186
Views:
12
Hi James (nad Nadya :-)) ),

.Download file getdirex.exe. This file is tester for function GetDirEx() from PDM.fll. This package contained VFP project with source code and PDM.fll library.

Function work on W95 without button "Create New Folder"..., but depend on Shell version.

Usage GetDirEx():
SET LIBRARY TO pdm.fll

LOCAL loDir,lcDir
loDir=CREATEOBJECT("_GetDirEx")
lcDir="c:\temp\"
loDir.DefaultDir=IIF(EMPTY(lcDir),"c:\",lcDir)
loDir.btnOK="Select" && New caption of button "OK"
IF GetDirEx(loDir)
   wait wind "Selected folder: "+loDir.OutPutDir
ENDIF
RETURN

DEFINE CLASS _GetDirEx AS custom

   * If property btnND,btnOK or btnCancel empty, then default caption of buttons are not change.
   WTitle="" && Window Title
   Title="" && dialog Title

   NewFolderAllowed=.T. && For Shell version 5.0

   Flag=0 && Member ulFlags in struc. BROWSEINFO (FLL function always insert BIF_USENEWUI if NewFolderAllowed=.T.)

   btnND="" && New caption of button "Make New Folder"
   _btnND_ID=0x3746 && Control ID of button "Make New Folder". Don't change !!!

   btnOK="" && New caption of button "OK"
   _btnOK_ID=0x1 && Control ID of button "OK". Don't change !!!

   btnCancel="" && New caption of button "Cancel"
   _btnCancel_ID=0x2 && Control ID of button "Cancel". Don't change !!!

   DefaultDir="" && Default directory

   OutPutDir="" && Output directory

   IsRoot=.F. && If Default directory is root, same as parametr lReadOnly in function GetDir() in VFP 7.0
ENDDEFINE
>Thanks,
>
>something had just struck me about your reference to NOT running under Windows 95, according to the documentation (and we know how accurate that can be <g>) for the BrowseForFolder method, the minimum operating systems are Windows 2000, Windows NT 4.0 with Internet Explorer 4.0, Windows 98, Windows 95 with Internet Explorer 4.0. Since I know that all of my users have IE 5.0 or greater (probably 5.5) - wouldn't it work for them???? Or was it the "add folder" button that didn't work on Win95?
>
>Thanks,
>James
>
>
>>Hi James,
>>
>>Just in case I sent message to Martin a minute ago (and cc to you). If this is not urgent and can wait few days, I hope, he would be able to help you.
>>
>>>Nadya,
>>>
>>>we're not lazy - just frugal with out time <g>.
>>>
>>>I had played a bit with both bits of code. But with the reference to not being able to work on Win95, then I'm sunk. Over half my users are still running Win95 (and since we work for the State of TN, that won't change overnight). After looking at a few things, I'm tempted to write my own. Or just use GETDIR() and if they chose to cancel, prompt if they wish to create a folder or actually cancel the process.
>>>
>>>The reason for all of this is to give the users a choice of where to put a backup (copy) of their database. Currently, I am copying the contents of their DATA sub-folder (in the application directory) to a sub-folder called BACKUP. Then I realized they needed to have a choice in the matter (dangerous stuff, choices & end-users <g>). Hence, looking for a way to "GetDir" with the ability to create a new folder.
>>>
>>>Thanks again for the insight.
"Navision is evil that needs to be erazed... to the ground"

Jabber: gorila@dione.zcu.cz
Jabber? Jabbim
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform